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","."]
docstr: Tests for decoding a tree from a Prüfer sequence.
docstr_tok: ["Tests","for","decoding","a","tree","from","a","Pr\u00fcfer","sequence","."]
code: def test_decoding(self):
      """Tests for decoding a tree from a Prüfer sequence."""
      # Example from Wikipedia.
      sequence = [3, 3, 3, 4]
      tree = nx.from_prufer_sequence(sequence)
      assert nodes_equal(list(tree), list(range(6)))
      edges = [(0, 3), (1, 3), (2, 3), (3, 4), (4, 5)]
      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 6 for calling the TestPruferSequence obj's underlying member method code with example usage: obj.test_decoding() without return types