code: def test_ecg_clustering(dataset, min_weight, ensemble_size):
      gc.collect()
  
      # Read in the graph and get a cugraph object
      G = dataset.get_graph()
      # read_weights_in_sp=False => value column dtype is float64
      G.edgelist.edgelist_df["weights"] = G.edgelist.edgelist_df[
          "weights"
      ].astype("float64")
  
      # Get the modularity score for partitioning versus random assignment
      cu_score, num_parts = cugraph_call(G, min_weight, ensemble_size)
      filename = dataset.metadata["name"]
      golden_score = golden_call(filename)
  
      # Assert that the partitioning has better modularity than the random
      # assignment
      assert cu_score > (0.95 * golden_score)
  
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 3 for calling a global function with example usage: test_ecg_clustering(dataset, min_weight, ensemble_size) without return types