code: def get_personalization(personalization_perc, nnz_vtx):
      personalization = None
      if personalization_perc != 0:
          personalization = {}
          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
      return personalization
  
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 5 for calling a global function with example usage: get_personalization(personalization_perc, nnz_vtx) and returns: personalization