code: def test_wikipedia_example(self):
      # Example from https://en.wikipedia.org/wiki/Gomory%E2%80%93Hu_tree
      G = nx.Graph()
      G.add_weighted_edges_from(
          (
              (0, 1, 1),
              (0, 2, 7),
              (1, 2, 1),
              (1, 3, 3),
              (1, 4, 2),
              (2, 4, 4),
              (3, 4, 1),
              (3, 5, 6),
              (4, 5, 2),
          )
      )
      for flow_func in flow_funcs:
          T = nx.gomory_hu_tree(
              G, capacity="weight", flow_func=flow_func
          )
          assert nx.is_tree(T)
          for u, v in combinations(G, 2):
              cut_value, edge = self.minimum_edge_weight(T, u, v)
              assert (
                  nx.minimum_cut_value(G, u, v, capacity="weight")
                  == cut_value
              )
  
file_path: networkx/networkx/algorithms/flow/tests/test_gomory_hu.py
imports: from itertools import combinations
  import pytest
  import networkx
  from networkx.algorithms.flow import boykov_kolmogorov, dinitz, edmonds_karp, preflow_push, shortest_augmenting_path
label_desc: Use image node_id 9 for calling the TestGomoryHuTree obj's underlying member method code with example usage: obj.test_wikipedia_example() without return types