code: def test_dask_mg_pagerank(
      dask_client,
      personalization_perc,
      directed,
      has_precomputed_vertex_out_weight,
      has_guess,
  ):
      input_data_path = (
          RAPIDS_DATASET_ROOT_DIR_PATH / "karate.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", "value")
  
      dg = cugraph.Graph(directed=directed)
      dg.from_dask_cudf_edgelist(
          ddf, "src", "dst", "value", store_transposed=True
      )
  
      personalization = None
      pre_vtx_o_wgt = None
      nstart = None
      max_iter = 100
      has_precomputed_vertex_out_weight
      if personalization_perc != 0:
          personalization, p = personalize(
              g.nodes(), personalization_perc
          )
      if has_precomputed_vertex_out_weight == 1:
          df = df[["src", "value"]]
          pre_vtx_o_wgt = (
              df.groupby(["src"], as_index=False)
              .sum()
              .rename(columns={"src": "vertex", "value": "sums"})
          )
  
      if has_guess == 1:
          nstart = cugraph.pagerank(
              g, personalization=personalization, tol=1e-6
          ).rename(columns={"pagerank": "values"})
          max_iter = 20
  
      expected_pr = cugraph.pagerank(
          g,
          personalization=personalization,
          precomputed_vertex_out_weight=pre_vtx_o_wgt,
          max_iter=max_iter,
          tol=1e-6,
          nstart=nstart,
      )
      result_pr = dcg.pagerank(
          dg,
          personalization=personalization,
          precomputed_vertex_out_weight=pre_vtx_o_wgt,
          max_iter=max_iter,
          tol=1e-6,
          nstart=nstart,
      )
      result_pr = result_pr.compute()
  
      err = 0
      tol = 1.0e-05
  
      assert len(expected_pr) == len(result_pr)
  
      compare_pr = expected_pr.merge(
          result_pr, on="vertex", suffixes=["_local", "_dask"]
      )
  
      for i in range(len(compare_pr)):
          diff = abs(
              compare_pr["pagerank_local"].iloc[i]
              - compare_pr["pagerank_dask"].iloc[i]
          )
          if diff > tol * 1.1:
              err = err + 1
      assert err == 0
  
file_path: cugraph/python/cugraph/cugraph/tests/link_analysis/test_pagerank_mg.py
imports: import gc
  import pytest
  import numpy
  import cudf
  import cugraph
  import cugraph.dask
  import dask_cudf
  from cugraph.testing import utils
  from cugraph.dask.common.mg_utils import is_single_gpu
  from cugraph.testing.utils import RAPIDS_DATASET_ROOT_DIR_PATH
label_desc: Use image node_id 4 for calling a global function with example usage: test_dask_mg_pagerank(dask_client, personalization_perc, directed, has_precomputed_vertex_out_weight, has_guess) without return types