def METHOD_NAME(package_obj, template):
    '''Given a package object and its SPDX template mapping, return a SPDX
    document block for the package. The mapping should have keys:
        PackageName
        PackageVersion
        PackageLicenseDeclared
        PackageCopyrightText
        PackageDownloadLocation'''
    block = ''
    mapping = package_obj.to_dict(template)
    # Package Name
    block += 'PackageName: {}\n'.format(mapping['PackageName'])
    # SPDXID
    spdx_ref, _ = spdx_common.get_package_spdxref(package_obj)
    block += 'SPDXID: {}\n'.format(spdx_ref)
    # Package Version
    if mapping['PackageVersion']:
        block += 'PackageVersion: {}\n'.format(mapping['PackageVersion'])
    # Package Supplier
    if mapping['PackageSupplier']:
        block += 'PackageSupplier: Organization: {}\n'.format(mapping['PackageSupplier'])
    else:
        block += 'PackageSupplier: NOASSERTION\n'
    # Package Download Location
    if mapping['PackageDownloadLocation']:
        block += 'PackageDownloadLoaction: {}\n'.format(
            mapping['PackageDownloadLocation'])
    else:
        block += 'PackageDownloadLocation: NOASSERTION\n'
    # Files Analyzed (always false for packages)
    block += 'FilesAnalyzed: false\n'
    # Package License Concluded (always NOASSERTION)
    block += 'PackageLicenseConcluded: NOASSERTION\n'
    # Package License Declared (use the license ref for this)
    declared_lic = mapping['PackageLicenseDeclared']
    if package_obj.pkg_format == 'deb':
        # Define debian licenses from copyright text as one license
        declared_lic = ', '.join(package_obj.pkg_licenses)
    # List debian package licenses collected from copyright texts
    block += 'PackageLicenseDeclared: ' + spdx_common.get_package_license_declared(
        declared_lic) + '\n'
    # Package Copyright Text
    if mapping['PackageCopyrightText']:
        block += 'PackageCopyrightText:' + spdx_formats.block_text.format(
            message=mapping['PackageCopyrightText']) + '\n'
    else:
        block += 'PackageCopyrightText: NONE\n'
    # Package URL
    if spdx_common.get_purl(package_obj):
        block += 'ExternalRef: PACKAGE-MANAGER purl {}\n'.format(
                spdx_common.get_purl(package_obj))
    # Package Comments
    block += get_package_comment(package_obj)
    return block