def METHOD_NAME(image_obj, template):
    '''Given an image object and the template object for SPDX, return the
    SPDX document block for the given image. For SPDX, the image is a package
    and hence follows the spec for packages.
    The mapping for images should have these keys:
        PackageName
        PackageVersion
        PackageDownloadLocation'''
    block = ''
    mapping = image_obj.to_dict(template)
    # Package Name
    block += 'PackageName: {}\n'.format(mapping['PackageName'])
    # Package SPDXID
    block += 'SPDXID: {}\n'.format(spdx_common.get_image_spdxref(image_obj))
    # Package Version
    block += 'PackageVersion: {}\n'.format(mapping['PackageVersion'])
    # Package Supplier (always NOASSERTION)
    block += 'PackageSupplier: NOASSERTION\n'
    # Package Download Location (always NOASSERTION)
    block += 'PackageDownloadLocation: NOASSERTION\n'
    # Files Analyzed (always false)
    block += 'FilesAnalyzed: false\n'
    # Concluded Package License (always NOASSERTION)
    block += 'PackageLicenseConcluded: NOASSERTION\n'
    # Declared Package License (always NOASSERTION)
    block += 'PackageLicenseDeclared: NOASSERTION\n'
    # Package Copyright Text (always NOASSERTION)
    block += 'PackageCopyrightText: NOASSERTION\n'
    # blank line
    block += '\n'
    # Since files are not analyzed within the image we move to relationships
    block += spdx_formats.describes.format(doc="SPDXRef-DOCUMENT",
                                           image=spdx_common.get_image_spdxref(
                                               image_obj)) + '\n'
    block += get_image_layer_relationships(image_obj) + '\n'
    # blank line
    block += '\n'
    # Describe each layer 'package' that the image contains
    for index, layer in enumerate(image_obj.layers):
        block += lhelpers.get_layer_block(layer, template) + '\n'
        # print layer relationship to previous layer if there is one
        if index != 0:
            block += lhelpers.get_layer_prereq(
                image_obj.layers[index], image_obj.layers[index - 1]) + '\n'
        # if the layer has packages, print out the relationships
        if layer.packages:
            block += lhelpers.get_layer_package_relationships(layer) + '\n'
    # print out all the packages if they are known
    pkg_block = get_image_packages_block(image_obj, template)
    if pkg_block:
        # add a blank line before adding the package block
        block += pkg_block + '\n'
        # print out the license block for packages
        block += get_image_packages_license_block(image_obj)
    block += get_image_file_license_block(image_obj)
    return block