def convert_catalog_id_to_object_id_string(catalog_id):
if not isinstance(catalog_id, Id):<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>seed_str = catalog_id.get_identifier() + catalog_id.get_authority() + '<STR_LIT>'<EOL>try:<EOL><INDENT>seed_str = str.encode(seed_str[:<NUM_LIT:12>])<EOL><DEDENT>except TypeError:<EOL><INDENT>seed_str = seed_str[:<NUM_LIT:12>]<EOL><DEDENT>seed_str = binascii.hexlify(seed_str)<EOL>try:<EOL><INDENT>seed_str = str(seed_str, '<STR_LIT:utf8>')<EOL><DEDENT>except TypeError:<EOL><INDENT>seed_str = str(seed_str)<EOL><DEDENT>return seed_str<EOL>
When doing hierarchies, need to convert a catalogId into an
    ObjectId, so convert to a string, then into a hex format.

    i.e. Bank Assessment hierarchy should become
         BANKASSESSME
         '42414e4b4153534553534d45'