code: def create_gs_heterogeneous_dgl_sampler():
      # Add Edge Data
      src_ser = [0, 1, 2, 0, 1, 2, 7, 9, 10, 11]
      dst_ser = [3, 4, 5, 6, 7, 8, 6, 6, 6, 6]
      etype_ser = [0, 0, 0, 1, 1, 1, 2, 2, 2, 2]
  
      etype_map = {
          0: ("nt.a", "connects", "nt.b"),
          1: ("nt.a", "connects", "nt.c"),
          2: ("nt.c", "connects", "nt.c"),
      }
  
      df = pd.DataFrame(
          {"_SRC_": src_ser, "_DST_": dst_ser, "etype": etype_ser}
      )
  
      etype_offset = 0
      edge_id_range_dict = {}
      edge_list_dict = {}
      for e in df["etype"].unique():
          subset_df = df[df["etype"] == e][["_SRC_", "_DST_"]]
          subset_df = cudf.DataFrame.from_pandas(subset_df)
          subset_df["_EDGE_ID_"] = (
              cp.arange(0, len(subset_df)) + etype_offset
          )
          edge_list_dict[etype_map[e]] = subset_df
          edge_id_range_dict[etype_map[e]] = (
              etype_offset,
              etype_offset + len(subset_df),
          )
          etype_offset = etype_offset + len(subset_df)
  
      etype_id_dict = {
          e: i for i, e in enumerate(edge_list_dict.keys())
      }
      return DGLUniformSampler(
          edge_list_dict, edge_id_range_dict, etype_id_dict, True
      )
  
file_path: cugraph/python/cugraph/cugraph/tests/gnn/test_dgl_uniform_sampler.py
imports: import pytest
  import pandas
  import numpy
  import cudf
  import cupy
  from cugraph.gnn.dgl_extensions.dgl_uniform_sampler import DGLUniformSampler
label_desc: Use image node_id 5 for calling a global function with example usage: create_gs_heterogeneous_dgl_sampler() and returns: DGLUniformSampler