code: def test_karate_club_partition():
      G = nx.karate_club_graph()
      part = [
          {0, 1, 2, 3, 7, 9, 11, 12, 13, 17, 19, 21},
          {16, 4, 5, 6, 10},
          {23, 25, 27, 28, 24, 31},
          {32, 33, 8, 14, 15, 18, 20, 22, 26, 29, 30},
      ]
      partition = nx.community.louvain_communities(
          G, seed=2, weight=None
      )
  
      assert part == partition
  
file_path: networkx/networkx/algorithms/community/tests/test_louvain.py
imports: import networkx
label_desc: Use image node_id 3 for calling a global function with example usage: test_karate_club_partition() without return types