class_docstr: Tests the spanning tree iterator on the example graph in the 2005 Sörensen
  and Janssens paper An Algorithm to Generate all Spanning Trees of a Graph in
  Order of Increasing Cost
class_docstr_tok: ["Tests","the","spanning","tree","iterator","on","the","example","graph","in","the","2005","S\u00f6rensen","and","Janssens","paper","An","Algorithm","to","Generate","all","Spanning","Trees","of","a","Graph","in","Order","of","Increasing","Cost"]
code: def setup_method(self):
      # Original Graph
      edges = [
          (0, 1, 5),
          (1, 2, 4),
          (1, 4, 6),
          (2, 3, 5),
          (2, 4, 7),
          (3, 4, 3),
      ]
      self.G = nx.Graph()
      self.G.add_weighted_edges_from(edges)
      # List of lists of spanning trees in increasing order
      self.spanning_trees = [
          # 1, MST, cost = 17
          [
              (0, 1, {"weight": 5}),
              (1, 2, {"weight": 4}),
              (2, 3, {"weight": 5}),
              (3, 4, {"weight": 3}),
          ],
          # 2, cost = 18
          [
              (0, 1, {"weight": 5}),
              (1, 2, {"weight": 4}),
              (1, 4, {"weight": 6}),
              (3, 4, {"weight": 3}),
          ],
          # 3, cost = 19
          [
              (0, 1, {"weight": 5}),
              (1, 4, {"weight": 6}),
              (2, 3, {"weight": 5}),
              (3, 4, {"weight": 3}),
          ],
          # 4, cost = 19
          [
              (0, 1, {"weight": 5}),
              (1, 2, {"weight": 4}),
              (2, 4, {"weight": 7}),
              (3, 4, {"weight": 3}),
          ],
          # 5, cost = 20
          [
              (0, 1, {"weight": 5}),
              (1, 2, {"weight": 4}),
              (1, 4, {"weight": 6}),
              (2, 3, {"weight": 5}),
          ],
          # 6, cost = 21
          [
              (0, 1, {"weight": 5}),
              (1, 4, {"weight": 6}),
              (2, 4, {"weight": 7}),
              (3, 4, {"weight": 3}),
          ],
          # 7, cost = 21
          [
              (0, 1, {"weight": 5}),
              (1, 2, {"weight": 4}),
              (2, 3, {"weight": 5}),
              (2, 4, {"weight": 7}),
          ],
          # 8, cost = 23
          [
              (0, 1, {"weight": 5}),
              (1, 4, {"weight": 6}),
              (2, 3, {"weight": 5}),
              (2, 4, {"weight": 7}),
          ],
      ]
  
imports: import pytest
  import networkx
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 1 for calling the TestSpanningTreeIterator obj's underlying member method code with example usage: obj.setup_method() without return types