code: def create_sampling_client(host, port, graph_id):
      """
      Returns a callable that, when called will run uniform_neighbor_sample. This
      is intended to be called in a separate thread to produce multiple
      concurrent client sampling calls.
      """
      client = CugraphServiceClient(host, port)
      fanout_vals = [10, 25]
      start_list = client.call_extension(
          "gen_vertex_list", graph_id, _batch_size
      )
  
      def sampling_function(result_device):
          return client.uniform_neighbor_sample(
              start_list,
              fanout_vals,
              _with_replacement,
              graph_id=graph_id,
              result_device=result_device,
          )
  
      return sampling_function
  
file_path: cugraph/benchmarks/cugraph-service/pytest-based/bench_cgs_client_scaling.py
imports: from threading import Thread
  import pytest
  from cugraph_service_client import CugraphServiceClient, defaults
  from cugraph_service_server.testing import utils
  from cugraph_benchmarking import params
  from cugraph_benchmarking.timer import TimerContext
label_desc: Use image node_id 2 for calling a global function with example usage: create_sampling_client(host, port, graph_id) and returns: sampling_function, client