code: def remote_graph_objs(request):
      """
      Fixture that returns a RemoteGraph object populated with graph data and
      algo callable based on the parameters. This also ensures a cugraph-service
      server if not.
      """
      (gpu_config, graph_data) = request.param
      server_process = None
  
      if gpu_config not in ["SG", "SNMG", "MNMG"]:
          raise RuntimeError(
              f"got unexpected gpu_config value: {gpu_config}"
          )
  
      # Ensure the appropriate server is running
      if gpu_config == "SG":
          (
              cgs_client,
              server_process,
          ) = utils.ensure_running_server_for_sampling()
          is_mg = False
  
      elif gpu_config == "SNMG":
          dask_scheduler_file = os.environ.get("SCHEDULER_FILE")
          if dask_scheduler_file is None:
              (
                  cgs_client,
                  server_process,
              ) = utils.ensure_running_server_for_sampling(
                  start_local_cuda_cluster=True
              )
          else:
              assert Path(dask_scheduler_file).exists()
              (
                  cgs_client,
                  server_process,
              ) = utils.ensure_running_server_for_sampling(
                  dask_scheduler_file=dask_scheduler_file
              )
          is_mg = True
  
      else:
          raise NotImplementedError(f"{gpu_config=}")
  
      with TimerContext("creating graph"):
          (G, num_verts) = create_remote_graph(
              graph_data, is_mg, cgs_client
          )
  
      uns_func = remote_uniform_neighbor_sample
  
      yield (G, num_verts, uns_func)
  
      del G  # is this necessary?
      if server_process is not None:
          print("\nTerminating server...", end="", flush=True)
          server_process.terminate()
          server_process.wait(timeout=60)
          print("done.", flush=True)
  
file_path: cugraph/benchmarks/cugraph-service/pytest-based/bench_cgs_uniform_neighbor_sample.py
imports: import os
  from pathlib import Path
  import pytest
  import numpy
  from cugraph_service_client import CugraphServiceClient
  from cugraph_service_client.exceptions import CugraphServiceError
  from cugraph_service_client import RemoteGraph
  from cugraph_service_server.testing import utils
  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: remote_graph_objs(request) without return types