docs: def get_equivalents(term_id: str) -> List[Mapping[str, Union[str, bool]]]:
      """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]
      """
      try:
          errors = []
          terms = get_terms(term_id)
          if len(terms) == 0:
              return {"equivalents": [], "errors": errors}
          elif len(terms) > 1:
              errors.append(
                  f'Too many primary IDs returned. Given term_id: {term_id} matches these term_ids: {[term["id"] for term in terms]}'
              )
              return {"equivalents": [], "errors": errors}
          else:
              term_id = terms[0]["id"]
  
          term_id_key = bel.db.arangodb.arango_id_to_key(term_id)
  
          equivalents = []
          query = f"""
          FOR vertex, edge IN 1..5
              ANY 'equivalence_nodes/{term_id_key}' equivalence_edges
              OPTIONS {{bfs: true, uniqueVertices : 'global'}}
              RETURN DISTINCT {{
                  term_id: vertex.name,
                  namespace: vertex.namespace,
                  primary: vertex.primary
              }}
          """
  
          cursor = belns_db.aql.execute(query, count=True, batch_size=20)
          for doc in cursor:
              if doc.get("term_id", False):
                  equivalents.append(doc)
  
          equivalents.append(
              {"term_id": term_id, "namespace": term_id.split(":")[0], "primary": True}
          )
  
          return {"equivalents": equivalents, "errors": errors}
  
      except Exception as e:
          log.error(f"Problem getting term equivalents for {term_id} msg: {e}")
          return {"equivalents": [], "errors": [f"Unexpected error {e}"]}