code: def test_dask_mg_degree(dask_client, directed, data_file):
      input_data_path = data_file
      chunksize = cugraph.dask.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"],
      )
  
      dg = cugraph.Graph(directed=directed)
      dg.from_dask_cudf_edgelist(ddf, "src", "dst")
      dg.compute_renumber_edge_list()
  
      g = cugraph.Graph(directed=directed)
      g.from_cudf_edgelist(df, "src", "dst")
  
      merge_df_in_degree = (
          dg.in_degree()
          .merge(g.in_degree(), on="vertex", suffixes=["_dg", "_g"])
          .compute()
      )
  
      merge_df_out_degree = (
          dg.out_degree()
          .merge(g.out_degree(), on="vertex", suffixes=["_dg", "_g"])
          .compute()
      )
  
      merge_df_degree = (
          dg.degree()
          .merge(g.degree(), on="vertex", suffixes=["_dg", "_g"])
          .compute()
      )
  
      assert_series_equal(
          merge_df_in_degree["degree_dg"],
          merge_df_in_degree["degree_g"],
          check_names=False,
          check_dtype=False,
      )
  
      assert_series_equal(
          merge_df_out_degree["degree_dg"],
          merge_df_out_degree["degree_g"],
          check_names=False,
          check_dtype=False,
      )
  
      assert_series_equal(
          merge_df_degree["degree_dg"],
          merge_df_degree["degree_g"],
          check_names=False,
          check_dtype=False,
      )
  
file_path: cugraph/python/cugraph/cugraph/tests/centrality/test_degree_centrality_mg.py
imports: import gc
  import pytest
  import cudf
  import dask_cudf
  import cugraph
  from cugraph.dask.common.mg_utils import is_single_gpu
  from cugraph.testing.utils import RAPIDS_DATASET_ROOT_DIR_PATH
  from cudf.testing import assert_series_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_dask_mg_degree(dask_client, directed, data_file) without return types