code: def check_edges(
      result, srcs, dsts, weights, num_verts, num_edges, num_seeds
  ):
      result_srcs, result_dsts, result_indices = result
  
      h_src_arr = srcs
      h_dst_arr = dsts
      h_wgt_arr = weights
  
      if isinstance(h_src_arr, cp.ndarray):
          h_src_arr = h_src_arr.get()
      if isinstance(h_dst_arr, cp.ndarray):
          h_dst_arr = h_dst_arr.get()
      if isinstance(h_wgt_arr, cp.ndarray):
          h_wgt_arr = h_wgt_arr.get()
  
      h_result_srcs = result_srcs.get()
      h_result_dsts = result_dsts.get()
      h_result_indices = result_indices.get()
  
      # Following the C validation, we will check that all edges are part of the
      # graph
      M = np.zeros((num_verts, num_verts), dtype=np.float32)
  
      # Construct the adjacency matrix
      for idx in range(num_edges):
          M[h_dst_arr[idx]][h_src_arr[idx]] = h_wgt_arr[idx]
  
      for edge in range(len(h_result_indices)):
          assert (
              M[h_result_dsts[edge]][h_result_srcs[edge]]
              == h_result_indices[edge]
          )
  
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 1 for calling a global function with example usage: check_edges(result, srcs, dsts, weights, num_verts, num_edges, num_seeds) without return types