code: def test_greed_modularity_communities_multidigraph():
      G = nx.MultiDiGraph()
      G.add_edges_from(
          [
              (1, 2),
              (1, 2),
              (3, 1),
              (2, 3),
              (2, 3),
              (3, 2),
              (1, 4),
              (2, 4),
              (4, 2),
              (4, 5),
              (5, 6),
              (5, 6),
              (6, 5),
              (5, 7),
              (6, 7),
              (7, 8),
              (5, 8),
              (8, 4),
          ]
      )
      expected = [frozenset({1, 2, 3, 4}), frozenset({5, 6, 7, 8})]
      assert (
          greedy_modularity_communities(G, weight="weight") == expected
      )
  
file_path: networkx/networkx/algorithms/community/tests/test_modularity_max.py
imports: import pytest
  import networkx
  from networkx.algorithms.community import greedy_modularity_communities, naive_greedy_modularity_communities
label_desc: Use image node_id 11 for calling a global function with example usage: test_greed_modularity_communities_multidigraph() without return types