docs: def get_hyperedge_id_mapping(H):
      """Generates mappings between the set of hyperedge IDs and integer indices
      (where every hyperedge ID corresponds to exactly 1 integer index).
  
      :param H: the hypergraph to find the hyperedge ID mapping on.
      :returns: dict -- for each integer index, maps the index to the hyperedge
                  ID.
                dict -- for each hyperedge ID, maps the hyperedge ID to the
                  integer index.
      :raises: TypeError -- Algorithm only applicable to undirected hypergraphs
  
      """
      if not isinstance(H, UndirectedHypergraph):
          raise TypeError("Algorithm only applicable to undirected hypergraphs")
  
      indices_to_hyperedge_ids, hyperedge_ids_to_indices = {}, {}
      hyperedge_index = 0
      for hyperedge_id in H.hyperedge_id_iterator():
          hyperedge_ids_to_indices.update({hyperedge_id: hyperedge_index})
          indices_to_hyperedge_ids.update({hyperedge_index: hyperedge_id})
          hyperedge_index += 1
  
      return indices_to_hyperedge_ids, hyperedge_ids_to_indices