code: def test_consolidation(graph_file):
      cluster = LocalCUDACluster()
      client = Client(cluster)
      chunksize = dcg.get_chunksize(graph_file)
  
      M = utils.read_csv_for_nx(graph_file)
  
      df = pd.DataFrame()
      df["source"] = pd.Series(M["0"])
      df["target"] = pd.Series(M["1"])
  
      ddf = dask_cudf.read_csv(
          graph_file,
          chunksize=chunksize,
          delimiter=" ",
          names=["source", "target", "weight"],
          dtype=["int32", "int32", "float32"],
          header=None,
      )
  
      Gnx = nx.from_pandas_edgelist(
          df, source="source", target="target", create_using=nx.DiGraph
      )
      G = cugraph.from_cudf_edgelist(
          ddf,
          source="source",
          destination="target",
          create_using=cugraph.Graph(directed=True),
      )
  
      t1 = time.time()
      assert compare_graphs(Gnx, G)
      t2 = time.time() - t1
      print("compare_graphs time: ", t2)
  
      Gnx.clear()
      G.clear()
      client.close()
      cluster.close()
  
imports: import gc
  import time
  import pytest
  import pandas
  import scipy
  import networkx
  import cupy
  import cudf
  import cugraph
  from cugraph.testing import utils
  from cudf.testing import assert_series_equal
  from cudf.testing.testing import assert_frame_equal
  import dask_cudf
  import cugraph.dask
  from dask.distributed import Client
  from dask_cuda import LocalCUDACluster
  from pylibcugraph import ResourceHandle
  from pylibcugraph import bfs
  from cugraph.dask.traversal.bfs import convert_to_cudf
  from cugraph.dask.common.mg_utils import is_single_gpu
label_desc: Use image node_id 15 for calling a global function with example usage: test_consolidation(graph_file) without return types