code: def sample_cugraph_graphs(
      sample_f,
      has_multiple_etypes,
      sgs_obj,
      sgs_src_range_obj,
      sg_node_dtype,
      nodes_ar,
      replace,
      fanout,
      edge_dir,
  ):
      if isinstance(nodes_ar, dict):
          nodes = {
              t: create_cudf_series_from_node_ar(n)
              for t, n in nodes_ar.items()
          }
      else:
          nodes = create_cudf_series_from_node_ar(nodes_ar)
  
      if has_multiple_etypes:
          # TODO: Convert into a single call when
          # https://github.com/rapidsai/cugraph/issues/2696 lands
          # Uniform sampling fails when the dtype
          # of the seed dtype is not same as the node dtype
          sampled_df = sample_multiple_sgs(
              sgs=sgs_obj,
              sgs_src_range_obj=sgs_src_range_obj,
              start_list_dtype=sg_node_dtype,
              sample_f=sample_f,
              start_list_d=nodes,
              edge_dir=edge_dir,
              fanout=fanout,
              with_replacement=replace,
          )
      else:
          sampled_df = sample_single_sg(
              sg=sgs_obj,
              start_list_range=sgs_src_range_obj,
              start_list_dtype=sg_node_dtype,
              sample_f=sample_f,
              start_list=nodes,
              fanout=fanout,
              with_replacement=replace,
          )
  
      # we reverse directions when directions=='in'
      if edge_dir == "in":
          sampled_df = sampled_df.rename(
              columns={"destinations": src_n, "sources": dst_n}
          )
      else:
          sampled_df = sampled_df.rename(
              columns={"sources": src_n, "destinations": dst_n}
          )
      # Transfer data to client
      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 8 for calling a global function with example usage: sample_cugraph_graphs(sample_f, has_multiple_etypes, sgs_obj, sgs_src_range_obj, sg_node_dtype, nodes_ar, replace, fanout, edge_dir) and returns: sampled_df