code: def personalize(vertices, personalization_perc):
      personalization = None
      if personalization_perc != 0:
          personalization = {}
          nnz_vtx = vertices.values_host
          personalization_count = int(
              (nnz_vtx.size * personalization_perc) / 100.0
          )
          nnz_vtx = np.random.choice(
              nnz_vtx,
              min(nnz_vtx.size, personalization_count),
              replace=False,
          )
          nnz_val = np.random.random(nnz_vtx.size)
          nnz_val = nnz_val / sum(nnz_val)
          for vtx, val in zip(nnz_vtx, nnz_val):
              personalization[vtx] = val
  
          k = np.fromiter(personalization.keys(), dtype="int32")
          v = np.fromiter(personalization.values(), dtype="float32")
          cu_personalization = cudf.DataFrame(
              {"vertex": k, "values": v}
          )
  
      return cu_personalization, personalization
  
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 1 for calling a global function with example usage: personalize(vertices, personalization_perc) and returns: cu_personalization,  personalization