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 encoding a tree as a Prüfer sequence using the
  iterative strategy.
docstr_tok: ["Tests","for","encoding","a","tree","as","a","Pr\u00fcfer","sequence","using","the","iterative","strategy","."]
code: def test_encoding(self):
      """Tests for encoding a tree as a Prüfer sequence using the
      iterative strategy.
  
      """
      # Example from Wikipedia.
      tree = nx.Graph([(0, 3), (1, 3), (2, 3), (3, 4), (4, 5)])
      sequence = nx.to_prufer_sequence(tree)
      assert sequence == [3, 3, 3, 4]
  
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 5 for calling the TestPruferSequence obj's underlying member method code with example usage: obj.test_encoding() without return types