code: def test_one_exchange_basic():
      G = nx.complete_graph(5)
      random.seed(5)
      for u, v, w in G.edges(data=True):
          w["weight"] = random.randrange(-100, 100, 1) / 10
  
      initial_cut = set(random.sample(sorted(G.nodes()), k=5))
      cut_size, (set1, set2) = maxcut.one_exchange(
          G, initial_cut, weight="weight", seed=5
      )
  
      _is_valid_cut(G, set1, set2)
      _cut_is_locally_optimal(G, cut_size, set1)
  
file_path: networkx/networkx/algorithms/approximation/tests/test_maxcut.py
imports: import random
  import pytest
  import networkx
  from networkx.algorithms.approximation import maxcut
label_desc: Use image node_id 6 for calling a global function with example usage: test_one_exchange_basic() without return types