code: def test_random_partitioning_all_to_one():
      G = nx.complete_graph(5)
      _, (set1, set2) = maxcut.randomized_partitioning(G, p=1)
      _is_valid_cut(G, set1, set2)
      assert len(set1) == G.number_of_nodes()
      assert len(set2) == 0
  
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 5 for calling a global function with example usage: test_random_partitioning_all_to_one() without return types