code: def test_dask_mg_eigenvector_centrality(
      dask_client, directed, input_data_path
  ):
      input_data_path = input_data_path.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"],
      )
      dg = cugraph.Graph(directed=True)
      dg.from_dask_cudf_edgelist(
          ddf, "src", "dst", store_transposed=True
      )
      mg_res = dcg.eigenvector_centrality(dg, tol=1e-6)
      mg_res = mg_res.compute()
      import networkx as nx
      from cugraph.testing import utils
  
      NM = utils.read_csv_for_nx(input_data_path)
      if directed:
          Gnx = nx.from_pandas_edgelist(
              NM, create_using=nx.DiGraph(), source="0", target="1"
          )
      else:
          Gnx = nx.from_pandas_edgelist(
              NM, create_using=nx.Graph(), source="0", target="1"
          )
      # FIXME: Compare against cugraph instead of nx
      nk = nx.eigenvector_centrality(Gnx)
      import pandas as pd
  
      pdf = pd.DataFrame(
          nk.items(), columns=["vertex", "eigenvector_centrality"]
      )
      exp_res = cudf.DataFrame(pdf)
      err = 0
      tol = 1.0e-05
      compare_res = exp_res.merge(
          mg_res, on="vertex", suffixes=["_local", "_dask"]
      )
      for i in range(len(compare_res)):
          diff = abs(
              compare_res["eigenvector_centrality_local"].iloc[i]
              - compare_res["eigenvector_centrality_dask"].iloc[i]
          )
          if diff > tol * 1.1:
              err = err + 1
      assert err == 0
  
file_path: cugraph/python/cugraph/cugraph/tests/centrality/test_eigenvector_centrality_mg.py
imports: import gc
  import pytest
  import cudf
  import dask_cudf
  import cugraph
  import cugraph.dask
  from cugraph.dask.common.mg_utils import is_single_gpu
  from cugraph.testing.utils import DATASETS
label_desc: Use image node_id 2 for calling a global function with example usage: test_dask_mg_eigenvector_centrality(dask_client, directed, input_data_path) without return types