code: def graph_objs(request):
      """
      Fixture that returns a Graph object and algo callable (SG or MG) based on
      the parameters. This handles instantiating the correct type (SG or MG) and
      populating it with graph data.
      """
      (gpu_config, graph_data) = request.param
      dask_client = None
      dask_cluster = None
  
      if gpu_config not in ["SG", "SNMG", "MNMG"]:
          raise RuntimeError(
              f"got unexpected gpu_config value: {gpu_config}"
          )
  
      with TimerContext("creating graph"):
          if gpu_config == "SG":
              (G, num_verts) = create_graph(graph_data)
              uns_func = uniform_neighbor_sample
          else:
              (
                  G,
                  num_verts,
                  dask_client,
                  dask_cluster,
              ) = create_mg_graph(graph_data)
              # The default uniform_neighbor_sample MG function returns a
              # dask_cudf DataFrame, which must be evaluated (.compute()) in
              # order to get usable results.
              # Uncomment to benchmark with a dask_cudf DataFrame
              #
              # uns_func = uniform_neighbor_sample_mg
  
              # This function calls the MG uniform_neighbor_sample function, then
              # calls .compute() on the resulting dask_cudf DataFrame in order to
              # return usable results.
              # Uncomment this to benchmark with results available to client
              #
              def uns_func(*args, **kwargs):
                  with TimerContext("sampling"):
                      result_ddf = uniform_neighbor_sample_mg(
                          *args, **kwargs
                      )
  
                  with TimerContext("dask compute() results"):
                      result_df = result_ddf.compute()
                      sources = result_df["sources"].to_cupy()
                      destinations = result_df["destinations"].to_cupy()
                      indices = result_df["indices"].to_cupy()
  
                  return (sources, destinations, indices)
  
      yield (G, num_verts, uns_func)
  
      if dask_client is not None:
          stop_dask_client(dask_client, dask_cluster)
  
file_path: cugraph/benchmarks/cugraph/pytest-based/bench_cugraph_uniform_neighbor_sample.py
imports: import os
  import pytest
  import numpy
  import cupy
  from cugraph.testing.mg_utils import start_dask_client, stop_dask_client
  import cudf
  import dask_cudf
  import rmm
  from cugraph import MultiGraph, uniform_neighbor_sample
  from cugraph.generators import rmat
  from cugraph.experimental import datasets
  from cugraph.dask import uniform_neighbor_sample
  from cugraph_benchmarking import params
  from cugraph_benchmarking.timer import TimerContext
label_desc: Use image node_id 4 for calling a global function with example usage: graph_objs(request) and returns: sources,  destinations,  indices