code: def _test_stoer_wagner(G, answer, weight="weight"):
      cut_value, partition = nx.stoer_wagner(
          G, weight, heap=nx.utils.PairingHeap
      )
      assert cut_value == answer
      _check_partition(G, cut_value, partition, weight)
      cut_value, partition = nx.stoer_wagner(
          G, weight, heap=nx.utils.BinaryHeap
      )
      assert cut_value == answer
      _check_partition(G, cut_value, partition, weight)
  
file_path: networkx/networkx/algorithms/connectivity/tests/test_stoer_wagner.py
imports: from itertools import chain
  import pytest
  import networkx
label_desc: Use image node_id 2 for calling a global function with example usage: _test_stoer_wagner(G, answer, weight) without return types