code: def test_sampling_dgl_heterogeneous_gs_m_fanouts():
      gs = create_gs_heterogeneous_dgl_sampler()
      # Test against DGLs output
      # See below notebook
      # https://gist.github.com/VibhuJawa/f85fda8e1183886078f2a34c28c4638c
  
      expected_output = {
          1: {
              ("nt.a", "connects", "nt.b"): 0,
              ("nt.a", "connects", "nt.c"): 1,
              ("nt.c", "connects", "nt.c"): 1,
          },
          2: {
              ("nt.a", "connects", "nt.b"): 0,
              ("nt.a", "connects", "nt.c"): 1,
              ("nt.c", "connects", "nt.c"): 2,
          },
          3: {
              ("nt.a", "connects", "nt.b"): 0,
              ("nt.a", "connects", "nt.c"): 1,
              ("nt.c", "connects", "nt.c"): 3,
          },
          -1: {
              ("nt.a", "connects", "nt.b"): 0,
              ("nt.a", "connects", "nt.c"): 1,
              ("nt.c", "connects", "nt.c"): 4,
          },
      }
  
      for fanout in [1, 2, 3, -1]:
          sampled_node = [6]
          sampled_node_p = cudf.Series(sampled_node)
          sampled_g = gs.sample_neighbors(
              {"nt.c": sampled_node_p}, fanout=fanout
          )
          sampled_g = convert_array_dict_to_df(sampled_g)
          for etype, output_df in sampled_g.items():
              assert expected_output[fanout][etype] == len(output_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 8 for calling a global function with example usage: test_sampling_dgl_heterogeneous_gs_m_fanouts() without return types