Creates two dictionaries that keep track of the mapping between the original labels and the new labels.
- Parameters:
graph (Graph) – The graph whose nodes should be relabeled.
- Returns:
A tuple containing the input graph with relabeled nodes and two dictionaries containing the mapping from the old
labels to the new ones and vice versa.
- Return type:
tuple[Graph, dict[Any, int], dict[int, Any]]