code: def test_uniform_neighbor_sample_csr_csc_global(
      dask_client, hops, seed
  ):
      el = dask_cudf.from_cudf(
          email_Eu_core.get_edgelist(), npartitions=4
      )
  
      G = cugraph.Graph(directed=True)
      G.from_dask_cudf_edgelist(el, source="src", destination="dst")
  
      seeds = G.select_random_vertices(seed, int(0.0001 * len(el)))
  
      (
          sampling_results,
          offsets,
          renumber_map,
      ) = cugraph.dask.uniform_neighbor_sample(
          G,
          seeds,
          hops,
          with_replacement=False,
          with_edge_properties=True,
          with_batch_ids=False,
          deduplicate_sources=True,
          # carryover not valid because C++ sorts on (hop,src)
          prior_sources_behavior="exclude",
          renumber=True,
          return_offsets=True,
          random_state=seed,
          use_legacy_names=False,
          compress_per_hop=False,
          compression="CSR",
          include_hop_column=False,
          keep_batches_together=True,
          min_batch_id=0,
          max_batch_id=0,
      )
  
      # can't use compute() since empty batches still get a partition
      n_workers = len(dask_client.scheduler_info()["workers"])
      for p in range(n_workers):
          partition = offsets.get_partition(p).compute()
          if not pandas.isna(partition.batch_id.iloc[0]):
              break
  
      sampling_results = sampling_results.get_partition(p).compute()
      offsets = offsets.get_partition(p).compute()
      renumber_map = renumber_map.get_partition(p).compute()
  
      major_offsets = sampling_results["major_offsets"].dropna().values
      majors = cudf.Series(cupy.arange(len(major_offsets) - 1))
      majors = majors.repeat(cupy.diff(major_offsets))
  
      minors = sampling_results["minors"].dropna()
      assert len(majors) == len(minors)
  
      majors = renumber_map.map.iloc[majors]
      minors = renumber_map.map.iloc[minors]
  
      for i in range(len(majors)):
          assert 1 == len(
              el[
                  (el.src == majors.iloc[i])
                  & (el.dst == minors.iloc[i])
              ]
          )
  
imports: import gc
  import random
  import os
  import pytest
  import pandas
  import cupy
  import cudf
  import cugraph
  import dask_cudf
  import cugraph.dask
  from cugraph.testing import UNDIRECTED_DATASETS
  from cugraph.dask import uniform_neighbor_sample
  from cugraph.dask.common.mg_utils import is_single_gpu
  from cugraph.datasets import email_Eu_core, small_tree
  from pylibcugraph.testing.utils import gen_fixture_params_product
label_desc: Use image node_id 21 for calling a global function with example usage: test_uniform_neighbor_sample_csr_csc_global(dask_client, hops, seed) without return types