<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compose_info(root_dir, files, hash_fn, aleph_record, urn_nbn=None):
 """ Compose `info` XML file. Info example:: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <info> <created>2014-07-31T10:58:53</created> <metadataversion>1.0</metadataversion> <packageid>c88f5a50-7b34-11e2-b930-005056827e51</packageid> <mainmets>mets.xml</mainmets> <titleid type="ccnb">cnb001852189</titleid> <titleid type="isbn">978-80-85979-89-6</titleid> <collection>edeposit</collection> <institution>nakladatelství Altar</institution> <creator>ABA001</creator> <size>1530226</size> <itemlist itemtotal="1"> <item>\data\Denik_zajatce_Sramek_CZ_v30f-font.epub</item> </itemlist> <checksum type="MD5" checksum="ce076548eaade33888005de5d4634a0d"> \MD5.md5 </checksum> </info> Args: root_dir (str):
 Absolute path to the root directory. files (list):
 Absolute paths to all ebook and metadata files. hash_fn (str):
 Absolute path to the MD5 file. aleph_record (str):
 String with Aleph record with metadata. Returns: str: XML string. """

    # compute hash for hashfile
    with open(hash_fn) as f:
        hash_file_md5 = hashlib.md5(f.read()).hexdigest()

    schema_location = "http://www.ndk.cz/standardy-digitalizace/info11.xsd"
    document = odict[
        "info": odict[
            "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
            "@xsi:noNamespaceSchemaLocation": schema_location,

            "created": time.strftime("%Y-%m-%dT%H:%M:%S", time.gmtime()),
            "metadataversion": "1.0",
            "packageid": _path_to_id(root_dir),

            # not used in SIP
            # "mainmets": _get_localized_fn(metadata_fn, root_dir),

            "titleid": None,
            "collection": "edeposit",
            "institution": None,
            "creator": None,
            "size": _calc_dir_size(root_dir) / 1024,  # size in kiB
            "itemlist": odict[
                "@itemtotal": "2",
                "item": map(
                    lambda x: _get_localized_fn(x, root_dir),
                    files
                )
            ],
            "checksum": odict[
                "@type": "MD5",
                "@checksum": hash_file_md5,
                "#text": _get_localized_fn(hash_fn, root_dir)
            ],
        ]
    ]

    # get informations from MARC record
    record = MARCXMLRecord(aleph_record)

    # get publisher info
    publisher = unicode(record.get_publisher(), "utf-8")
    if record.get_publisher(None):
        document["info"]["institution"] = remove_hairs(publisher)

    # get <creator> info
    creator = record.getDataRecords("910", "a", False)
    alt_creator = record.getDataRecords("040", "d", False)
    document["info"]["creator"] = creator[0] if creator else alt_creator[-1]

    # collect informations for <titleid> tags
    isbns = record.get_ISBNs()

    ccnb = record.getDataRecords("015", "a", False)
    ccnb = ccnb[0] if ccnb else None

    if any([isbns, ccnb, urn_nbn]):  # TODO: issn
        document["info"]["titleid"] = []

    for isbn in isbns:
        document["info"]["titleid"].append({
            "@type": "isbn",
            "#text": isbn
        })

    if ccnb:
        document["info"]["titleid"].append({
            "@type": "ccnb",
            "#text": ccnb
        })

    if urn_nbn:
        document["info"]["titleid"].append({
            "@type": "urnnbn",
            "#text": urn_nbn
        })

    # TODO: later
    # if issn:
    #     document["info"]["titleid"].append({
    #         "@type": "issn",
    #         "#text": issn
    #     })

    # remove unset options
    unset_keys = [
        key
        for key in document["info"]
        if key is None
    ]
    for key in unset_keys:
        del document[key]

    xml_document = xmltodict.unparse(document, pretty=True)
    return xml_document.encode("utf-8")