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_encoding(self):
      T = nx.full_rary_tree(2, 2**3 - 1)
      expected = (((), ()), ((), ()))
      actual = nx.to_nested_tuple(T, 0)
      assert nodes_equal(expected, actual)
  
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 3 for calling the TestNestedTuple obj's underlying member method code with example usage: obj.test_encoding() without return types