def get_node_mapping(H):
    """Generates mappings between the set of nodes and integer indices (where
    every node corresponds to exactly 1 integer index).

    :param H: the hypergraph to find the node mapping on.
    :returns: dict -- for each integer index, maps the index to the node.
              dict -- for each node, maps the node to the integer index.

    """
    node_set = H.get_node_set()
    nodes_to_indices, indices_to_nodes = {}, {}
    node_index = 0
    for node in node_set:
        nodes_to_indices.update({node: node_index})
        indices_to_nodes.update({node_index: node})
        node_index += 1
    return indices_to_nodes, nodes_to_indices
