code: def test_pagerank_multi_column(
      graph_file,
      max_iter,
      tol,
      alpha,
      personalization_perc,
      has_guess,
      has_precomputed_vertex_out_weight,
  ):
      # NetworkX PageRank
      dataset_path = graph_file.get_path()
      M = utils.read_csv_for_nx(dataset_path)
      nnz_vtx = np.unique(M[["0", "1"]])
  
      Gnx = nx.from_pandas_edgelist(
          M,
          source="0",
          target="1",
          edge_attr="weight",
          create_using=nx.DiGraph(),
      )
  
      networkx_pr, networkx_prsn = networkx_call(
          Gnx, max_iter, tol, alpha, personalization_perc, nnz_vtx
      )
  
      cu_nstart = None
      pre_vtx_o_wgt = None
      if has_guess == 1:
          cu_nstart_temp = cudify(networkx_pr)
          max_iter = 100
          cu_nstart = cudf.DataFrame()
          cu_nstart["vertex_0"] = cu_nstart_temp["vertex"]
          cu_nstart["vertex_1"] = cu_nstart["vertex_0"] + 1000
          cu_nstart["values"] = cu_nstart_temp["values"]
  
      cu_prsn_temp = cudify(networkx_prsn)
      if cu_prsn_temp is not None:
          cu_prsn = cudf.DataFrame()
          cu_prsn["vertex_0"] = cu_prsn_temp["vertex"]
          cu_prsn["vertex_1"] = cu_prsn["vertex_0"] + 1000
          cu_prsn["values"] = cu_prsn_temp["values"]
      else:
          cu_prsn = cu_prsn_temp
  
      cu_M = cudf.DataFrame()
      cu_M["src_0"] = cudf.Series(M["0"])
      cu_M["dst_0"] = cudf.Series(M["1"])
      cu_M["src_1"] = cu_M["src_0"] + 1000
      cu_M["dst_1"] = cu_M["dst_0"] + 1000
      cu_M["weights"] = cudf.Series(M["weight"])
  
      cu_G = cugraph.Graph(directed=True)
      cu_G.from_cudf_edgelist(
          cu_M,
          source=["src_0", "src_1"],
          destination=["dst_0", "dst_1"],
          edge_attr="weights",
          store_transposed=True,
      )
  
      if has_precomputed_vertex_out_weight == 1:
          df = cu_M[["src_0", "src_1", "weights"]]
          pre_vtx_o_wgt = (
              df.groupby(["src_0", "src_1"], as_index=False)
              .sum()
              .rename(columns={"weights": "sums"})
          )
  
      df = cugraph.pagerank(
          cu_G,
          alpha=alpha,
          max_iter=max_iter,
          tol=tol,
          personalization=cu_prsn,
          nstart=cu_nstart,
          precomputed_vertex_out_weight=pre_vtx_o_wgt,
      )
  
      cugraph_pr = []
  
      df = df.sort_values("0_vertex").reset_index(drop=True)
  
      pr_scores = df["pagerank"].to_numpy()
      for i, rank in enumerate(pr_scores):
          cugraph_pr.append((i, rank))
  
      # Calculating mismatch
      networkx_pr = sorted(networkx_pr.items(), key=lambda x: x[0])
      err = 0
      assert len(cugraph_pr) == len(networkx_pr)
      for i in range(len(cugraph_pr)):
          if (
              abs(cugraph_pr[i][1] - networkx_pr[i][1]) > tol * 1.1
              and cugraph_pr[i][0] == networkx_pr[i][0]
          ):
              err = err + 1
      print("Mismatches:", err)
      assert err < (0.01 * len(cugraph_pr))
  
file_path: cugraph/python/cugraph/cugraph/tests/link_analysis/test_pagerank.py
imports: import gc
  import time
  import pytest
  import numpy
  import networkx
  import cudf
  import cugraph
  from cugraph.testing import utils, DEFAULT_DATASETS
  from cugraph.datasets import karate
label_desc: Use image node_id 8 for calling a global function with example usage: test_pagerank_multi_column(graph_file, max_iter, tol, alpha, personalization_perc, has_guess, has_precomputed_vertex_out_weight) without return types