code: def sample_single_sg(
      sg,
      sample_f,
      start_list,
      start_list_dtype,
      start_list_range,
      fanout,
      with_replacement,
  ):
      if isinstance(start_list, dict):
          start_list = cudf.concat(list(start_list.values()))
      # Uniform sampling fails when the dtype
      # of the seed dtype is not same as the node dtype
      start_list = start_list.astype(start_list_dtype)
      # Filter start list by ranges
      # to enure the seed is with in index values
      # see below:
      # https://github.com/rapidsai/cugraph/blob/branch-22.12/cpp/src/prims/per_v_random_select_transform_outgoing_e.cuh
      start_list = start_list[
          (start_list >= start_list_range[0])
          & (start_list <= start_list_range[1])
      ]
      if len(start_list) == 0:
          empty_df = cudf.DataFrame(
              {"sources": [], "destinations": [], "indices": []}
          )
          return empty_df
      sampled_df = sample_f(
          sg,
          start_list=start_list,
          fanout_vals=[fanout],
          with_replacement=with_replacement,
      )
      if isinstance(sampled_df, dask_cudf.DataFrame):
          sampled_df = sampled_df.compute()
      return sampled_df
  
file_path: cugraph/python/cugraph/cugraph/gnn/dgl_extensions/utils/sampling.py
imports: import cugraph
  import cudf
  import cupy
  import dask_cudf
label_desc: Use image node_id 3 for calling a global function with example usage: sample_single_sg(sg, sample_f, start_list, start_list_dtype, start_list_range, fanout, with_replacement) and returns: sampled_df, empty_df