def get_equivalents(term_id: str) -> List[Mapping[str, Union[str, bool]]]:
try:<EOL><INDENT>errors = []<EOL>terms = get_terms(term_id)<EOL>if len(terms) == <NUM_LIT:0>:<EOL><INDENT>return {"<STR_LIT>": [], "<STR_LIT>": errors}<EOL><DEDENT>elif len(terms) > <NUM_LIT:1>:<EOL><INDENT>errors.append(<EOL>f'<STR_LIT>'<EOL>)<EOL>return {"<STR_LIT>": [], "<STR_LIT>": errors}<EOL><DEDENT>else:<EOL><INDENT>term_id = terms[<NUM_LIT:0>]["<STR_LIT:id>"]<EOL><DEDENT>term_id_key = bel.db.arangodb.arango_id_to_key(term_id)<EOL>equivalents = []<EOL>query = f"""<STR_LIT>"""<EOL>cursor = belns_db.aql.execute(query, count=True, batch_size=<NUM_LIT:20>)<EOL>for doc in cursor:<EOL><INDENT>if doc.get("<STR_LIT>", False):<EOL><INDENT>equivalents.append(doc)<EOL><DEDENT><DEDENT>equivalents.append(<EOL>{"<STR_LIT>": term_id, "<STR_LIT>": term_id.split("<STR_LIT::>")[<NUM_LIT:0>], "<STR_LIT>": True}<EOL>)<EOL>return {"<STR_LIT>": equivalents, "<STR_LIT>": errors}<EOL><DEDENT>except Exception as e:<EOL><INDENT>log.error(f"<STR_LIT>")<EOL>return {"<STR_LIT>": [], "<STR_LIT>": [f"<STR_LIT>"]}<EOL><DEDENT>
Get equivalents given ns:id


    Args:
        term_id (str): term id
    Returns:
        List[Mapping[str, Union[str, bool]]]: e.g. [{'term_id': 'HGNC:5', 'namespace': 'HGNC'}, 'primary': False]