code: def test_inter_community_edges_with_digraphs():
      G = nx.complete_graph(2, create_using=nx.DiGraph())
      partition = [{0}, {1}]
      assert inter_community_edges(G, partition) == 2
  
      G = nx.complete_graph(10, create_using=nx.DiGraph())
      partition = [{0}, {1, 2}, {3, 4, 5}, {6, 7, 8, 9}]
      assert inter_community_edges(G, partition) == 70
  
      G = nx.cycle_graph(4, create_using=nx.DiGraph())
      partition = [{0, 1}, {2, 3}]
      assert inter_community_edges(G, partition) == 2
  
file_path: networkx/networkx/algorithms/community/tests/test_quality.py
imports: import pytest
  import networkx
  from networkx import barbell_graph
  from networkx.algorithms.community import modularity, partition_quality
  from networkx.algorithms.community.quality import inter_community_edges
label_desc: Use image node_id 3 for calling a global function with example usage: test_inter_community_edges_with_digraphs() without return types