class_docstr: Unit tests for the Prüfer sequence encoding and decoding
  functions.
class_docstr_tok: ["Unit","tests","for","the","Pr\u00fcfer","sequence","encoding","and","decoding","functions","."]
code: def test_decoding2(self):
      # Example from "An Optimal Algorithm for Prufer Codes".
      sequence = [2, 4, 0, 1, 3, 3]
      tree = nx.from_prufer_sequence(sequence)
      assert nodes_equal(list(tree), list(range(8)))
      edges = [(0, 1), (0, 4), (1, 3), (2, 4), (2, 5), (3, 6), (3, 7)]
      assert edges_equal(list(tree.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 7 for calling the TestPruferSequence obj's underlying member method code with example usage: obj.test_decoding2() without return types