code: def test_weight_name():
      G = nx.Graph()
      G.add_edge(1, 2, weight=1, cost=8)
      G.add_edge(1, 3, cost=2)
      G.add_edge(2, 3, cost=4)
      _test_stoer_wagner(G, 6, weight="cost")
  
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 6 for calling a global function with example usage: test_weight_name() without return types