code: def test_sampling_gs_heterogeneous_out_dir():
      sampler = create_gs_heterogeneous_dgl_sampler()
      # DGL expected_output from
      # https://gist.github.com/VibhuJawa/f85fda8e1183886078f2a34c28c4638c
      expeced_val_d = {
          0: {
              ("nt.a", "connects", "nt.b"): (
                  cudf.Series([0], dtype=np.int32),
                  cudf.Series([3], dtype=np.int32),
              ),
              ("nt.a", "connects", "nt.c"): (
                  cudf.Series([0]),
                  cudf.Series([6]),
              ),
              ("nt.c", "connects", "nt.c"): (
                  cudf.Series([]),
                  cudf.Series([]),
              ),
          },
          1: {
              ("nt.a", "connects", "nt.b"): (
                  cudf.Series([1], dtype=np.int32),
                  cudf.Series([4], dtype=np.int32),
              ),
              ("nt.a", "connects", "nt.c"): (
                  cudf.Series([1]),
                  cudf.Series([7]),
              ),
              ("nt.c", "connects", "nt.c"): (
                  cudf.Series([], dtype=np.int32),
                  cudf.Series([], dtype=np.int32),
              ),
          },
          2: {
              ("nt.a", "connects", "nt.b"): (
                  cudf.Series([2], dtype=np.int32),
                  cudf.Series([5], dtype=np.int32),
              ),
              ("nt.a", "connects", "nt.c"): (
                  cudf.Series([2]),
                  cudf.Series([8]),
              ),
              ("nt.c", "connects", "nt.c"): (
                  cudf.Series([], dtype=np.int32),
                  cudf.Series([], dtype=np.int32),
              ),
          },
      }
  
      for seed in expeced_val_d.keys():
          fanout = 4
          sampled_node_p = (
              cudf.Series(seed).astype(np.int32).to_dlpack()
          )
          sampled_g = sampler.sample_neighbors(
              {"nt.a": sampled_node_p}, fanout=fanout, edge_dir="out"
          )
          sampled_g = convert_array_dict_to_df(sampled_g)
          for etype, df in sampled_g.items():
              output_df = (
                  df[["_SRC_", "_DST_"]]
                  .sort_values(by=["_SRC_", "_DST_"])
                  .reset_index(drop=True)
                  .astype(np.int32)
              )
              expected_df = cudf.DataFrame(
                  {
                      "_SRC_": expeced_val_d[seed][etype][0],
                      "_DST_": expeced_val_d[seed][etype][1],
                  }
              ).astype(np.int32)
              cudf.testing.assert_frame_equal(output_df, expected_df)
  
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 6 for calling a global function with example usage: test_sampling_gs_heterogeneous_out_dir() without return types