code: def test_sampling_homogeneous_gs_out_dir():
      src_ser = cudf.Series([1, 1, 1, 1, 1, 2, 2, 3])
      dst_ser = cudf.Series([2, 3, 4, 5, 6, 3, 4, 7])
      df = cudf.DataFrame(
          {
              "_SRC_": src_ser,
              "_DST_": dst_ser,
              "_EDGE_ID_": np.arange(len(src_ser)),
          }
      )
  
      sampler = DGLUniformSampler(
          {("_N", "connects", "_N"): df},
          {("_N", "connects", "_N"): (0, 8)},
          {(("_N", "connects", "_N")): 1},
          True,
      )
  
      # below are obtained from dgl runs on the same graph
      expected_out = {
          1: ([1, 1, 1, 1, 1], [2, 3, 4, 5, 6]),
          2: ([2, 2], [3, 4]),
          3: ([3], [7]),
          4: ([], []),
      }
  
      for seed in expected_out.keys():
          seed_cap = cudf.Series([seed]).to_dlpack()
          sample_src, sample_dst, sample_eid = sampler.sample_neighbors(
              seed_cap, fanout=9, edge_dir="out"
          )
          output_df = cudf.DataFrame(
              {"src": sample_src, "dst": sample_dst}
          ).astype(np.int64)
          output_df = output_df.sort_values(by=["src", "dst"])
          output_df = output_df.reset_index(drop=True)
  
          expected_df = cudf.DataFrame(
              {
                  "src": expected_out[seed][0],
                  "dst": expected_out[seed][1],
              }
          ).astype(np.int64)
          cudf.testing.assert_frame_equal(output_df, expected_df)
  
          sample_edge_id_df = cudf.DataFrame(
              {
                  "_SRC_": sample_src,
                  "_DST_": sample_dst,
                  "_EDGE_ID_": sample_eid,
              }
          )
  
          assert_correct_eids(df, sample_edge_id_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 3 for calling a global function with example usage: test_sampling_homogeneous_gs_out_dir() without return types