code: def assert_partition_equal(x, y):
      assert set(map(frozenset, x)) == set(map(frozenset, y))
  
file_path: networkx/networkx/algorithms/community/tests/test_kernighan_lin.py
imports: from itertools import permutations
  import pytest
  import networkx
  from networkx.algorithms.community import kernighan_lin_bisection
label_desc: Use image node_id 1 for calling a global function with example usage: assert_partition_equal(x, y) without return types