class_docstr: Unit tests for the nested tuple encoding and decoding functions.
class_docstr_tok: ["Unit","tests","for","the","nested","tuple","encoding","and","decoding","functions","."]
code: def test_sensible_relabeling(self):
      balanced = (((), ()), ((), ()))
      T = nx.from_nested_tuple(balanced, sensible_relabeling=True)
      edges = [(0, 1), (0, 2), (1, 3), (1, 4), (2, 5), (2, 6)]
      assert nodes_equal(list(T), list(range(2**3 - 1)))
      assert edges_equal(list(T.edges()), edges)
  
file_path: networkx/networkx/algorithms/tree/tests/test_coding.py
imports: from itertools import product
  import pytest
  import networkx
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 6 for calling the TestNestedTuple obj's underlying member method code with example usage: obj.test_sensible_relabeling() without return types