code: def test_pagerank_invalid_personalization_dtype():
      dataset_path = karate.get_path()
      M = utils.read_csv_for_nx(dataset_path)
      G = cugraph.Graph(directed=True)
      cu_M = cudf.DataFrame()
      cu_M["src"] = cudf.Series(M["0"])
      cu_M["dst"] = cudf.Series(M["1"])
  
      cu_M["weights"] = cudf.Series(M["weight"])
      G.from_cudf_edgelist(
          cu_M,
          source="src",
          destination="dst",
          edge_attr="weights",
          store_transposed=True,
      )
  
      personalization = cudf.DataFrame()
      personalization["vertex"] = [17, 26]
      personalization["values"] = [0.5, 0.75]
  
      # cu_M["weights"] is of type 'float32' and personalization["values"] of type
      # 'float64'. The python code should enforce that both types match nd raise the
      # following warning.
      warning_msg = (
          "PageRank requires 'personalization' values to match the "
          "graph's 'edge_attr' type. edge_attr type is: "
          "float32 and got 'personalization' values "
          "of type: float64."
      )
      with pytest.warns(UserWarning, match=warning_msg):
          cugraph.pagerank(G, personalization=personalization)
  
      # cu_M["src"] is of type 'int32' and personalization["vertex"] of type
      # 'int64'. The python code should enforce that both types match and raise the
      # following warning.
      warning_msg = (
          "PageRank requires 'personalization' vertex to match the "
          "graph's 'vertex' type. input graph's vertex type is: "
          "int32 and got 'personalization' vertex "
          "of type: int64."
      )
      with pytest.warns(UserWarning, match=warning_msg):
          cugraph.pagerank(G, personalization=personalization)
  
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 9 for calling a global function with example usage: test_pagerank_invalid_personalization_dtype() without return types