code: def test_with_nstart(graph_file, max_iter, which_import):
      nx = which_import
  
      M = utils.read_csv_for_nx(graph_file)
      Gnx = nx.from_pandas_edgelist(
          M,
          source="0",
          target="1",
          edge_attr="weight",
          create_using=nx.DiGraph(),
      )
  
      z = {k: 1.0 / Gnx.number_of_nodes() for k in Gnx.nodes()}
  
      M = utils.read_csv_for_nx(graph_file)
      Gnx = nx.from_pandas_edgelist(
          M,
          source="0",
          target="1",
          edge_attr="weight",
          create_using=nx.DiGraph(),
      )
      pr = nx.pagerank(Gnx, max_iter=max_iter, nstart=z)
  
      # Rounding issues show up in runs but this tests that the
      # cugraph and networkx algrorithms are being correctly called.
      assert (sorted(pr, key=pr.get)[:14]) == KARATE_NSTART_RANKINGS
  
file_path: cugraph/python/cugraph/cugraph/tests/nx/test_compat_pr.py
imports: import gc
  import importlib
  import pytest
  import numpy
  from cugraph.testing import utils
  from cugraph.datasets import karate
  from pylibcugraph.testing.utils import gen_fixture_params_product
label_desc: Use image node_id 9 for calling a global function with example usage: test_with_nstart(graph_file, max_iter, which_import) without return types