code: def test_neighborhood_sampling_cudf(
      sg_graph_objs,
      valid_graph_data,
      renumber,
      store_transposed,
      with_replacement,
  ):
      resource_handle = ResourceHandle()
      graph_props = GraphProperties(
          is_symmetric=False, is_multigraph=False
      )
  
      (
          device_srcs,
          device_dsts,
          device_weights,
          ds_name,
          is_valid,
      ) = valid_graph_data
      # FIXME cupy has no attribute cp.union1d
      vertices = np.union1d(
          cp.asnumpy(device_srcs), cp.asnumpy(device_dsts)
      )
      vertices = cp.asarray(vertices)
  
      device_srcs = cudf.Series(device_srcs, dtype=device_srcs.dtype)
      device_dsts = cudf.Series(device_dsts, dtype=device_dsts.dtype)
      device_weights = cudf.Series(
          device_weights, dtype=device_weights.dtype
      )
  
      start_list = cp.random.choice(device_srcs, size=3)
      fanout_vals = np.asarray([1, 2], dtype="int32")
  
      num_verts = len(vertices)
      num_edges = max(len(device_srcs), len(device_dsts))
  
      sg = SGGraph(
          resource_handle=resource_handle,
          graph_properties=graph_props,
          src_or_offset_array=device_srcs,
          dst_or_index_array=device_dsts,
          weight_array=device_weights,
          store_transposed=store_transposed,
          renumber=renumber,
          do_expensive_check=False,
      )
  
      result = uniform_neighbor_sample(
          resource_handle,
          sg,
          start_list,
          fanout_vals,
          with_replacement=with_replacement,
          do_expensive_check=False,
      )
  
      check_edges(
          result,
          device_srcs,
          device_dsts,
          device_weights,
          num_verts,
          num_edges,
          len(start_list),
      )
  
file_path: cugraph/python/pylibcugraph/pylibcugraph/tests/test_uniform_neighbor_sample.py
imports: import gc
  import pytest
  import cupy
  import numpy
  import cudf
  from pylibcugraph import SGGraph, ResourceHandle, GraphProperties
  from pylibcugraph import uniform_neighbor_sample
label_desc: Use image node_id 3 for calling a global function with example usage: test_neighborhood_sampling_cudf(sg_graph_objs, valid_graph_data, renumber, store_transposed, with_replacement) without return types