code: def test_edmot():
      """
      Test the EdMot procedure.
      """
      graph = nx.newman_watts_strogatz_graph(50, 5, 0.3)
  
      model = EdMot()
  
      model.fit(graph)
      memberships = model.get_memberships()
  
      indices = [k for k, v in memberships.items()].sort()
      nodes = [node for node in graph.nodes()].sort()
  
      assert graph.number_of_nodes() == len(memberships)
      assert indices == nodes
      assert type(memberships) == dict
  
      graph = nx.newman_watts_strogatz_graph(150, 5, 0.3)
  
      model = EdMot()
  
      model.fit(graph)
      memberships = model.get_memberships()
  
      indices = [k for k, v in memberships.items()].sort()
      nodes = [node for node in graph.nodes()].sort()
  
      assert graph.number_of_nodes() == len(memberships)
      assert indices == nodes
      assert type(memberships) == dict
  
imports: import numpy
  import networkx
  from karateclub.community_detection.non_overlapping import EdMot, LabelPropagation, SCD, GEMSEC
label_desc: Use image node_id 1 for calling a global function with example usage: test_edmot() without return types