code: def test_dask_mg_wcc(dask_client, directed):
      input_data_path = (
          RAPIDS_DATASET_ROOT_DIR_PATH / "netscience.csv"
      ).as_posix()
      print(f"dataset={input_data_path}")
      chunksize = dcg.get_chunksize(input_data_path)
  
      ddf = dask_cudf.read_csv(
          input_data_path,
          chunksize=chunksize,
          delimiter=" ",
          names=["src", "dst", "value"],
          dtype=["int32", "int32", "float32"],
      )
  
      df = cudf.read_csv(
          input_data_path,
          delimiter=" ",
          names=["src", "dst", "value"],
          dtype=["int32", "int32", "float32"],
      )
  
      g = cugraph.Graph(directed=directed)
      g.from_cudf_edgelist(df, "src", "dst", renumber=True)
  
      dg = cugraph.Graph(directed=directed)
      dg.from_dask_cudf_edgelist(ddf, "src", "dst")
  
      if not directed:
          expected_dist = cugraph.weakly_connected_components(g)
          result_dist = dcg.weakly_connected_components(dg)
  
          result_dist = result_dist.compute()
          compare_dist = expected_dist.merge(
              result_dist, on="vertex", suffixes=["_local", "_dask"]
          )
  
          unique_local_labels = compare_dist["labels_local"].unique()
  
          for label in unique_local_labels.values.tolist():
              dask_labels_df = compare_dist[
                  compare_dist["labels_local"] == label
              ]
              dask_labels = dask_labels_df["labels_dask"]
              assert (dask_labels.iloc[0] == dask_labels).all()
      else:
          with pytest.raises(ValueError):
              cugraph.weakly_connected_components(g)
  
file_path: cugraph/python/cugraph/cugraph/tests/components/test_connectivity_mg.py
imports: import gc
  import pytest
  import cudf
  import dask_cudf
  import cugraph
  import cugraph.dask
  from cugraph.testing.utils import RAPIDS_DATASET_ROOT_DIR_PATH
label_desc: Use image node_id 2 for calling a global function with example usage: test_dask_mg_wcc(dask_client, directed) without return types