code: def test_ecg_clustering_nx(dataset, min_weight, ensemble_size):
      gc.collect()
      dataset_path = dataset.get_path()
      # Read in the graph and get a NetworkX graph
      M = utils.read_csv_for_nx(dataset_path, read_weights_in_sp=True)
      G = nx.from_pandas_edgelist(
          M,
          source="0",
          target="1",
          edge_attr="weight",
          create_using=nx.Graph(),
      )
  
      # Get the modularity score for partitioning versus random assignment
      df_dict = cugraph.ecg(G, min_weight, ensemble_size, "weight")
  
      assert isinstance(df_dict, dict)
  
file_path: cugraph/python/cugraph/cugraph/tests/community/test_ecg.py
imports: import gc
  import pytest
  import networkx
  import cugraph
  from cugraph.testing import utils
  from cugraph.datasets import karate, dolphins, netscience
label_desc: Use image node_id 4 for calling a global function with example usage: test_ecg_clustering_nx(dataset, min_weight, ensemble_size) without return types