code: def test_sampling_heterograph(dgl_graph):
      cugraph_gs = cugraph_dgl.cugraph_storage_from_heterograph(
          dgl_graph
      )
  
      for fanout in [1, 2, 3, -1]:
          for ntype in ["nt.a", "nt.b", "nt.c"]:
              for d in ["in", "out"]:
                  assert_same_sampling_len(
                      dgl_graph,
                      cugraph_gs,
                      nodes={ntype: [0]},
                      fanout=fanout,
                      edge_dir=d,
                  )
  
file_path: cugraph/python/cugraph-dgl/tests/test_cugraph_storage.py
imports: import pytest
  from cugraph.utilities.utils import import_optional
  import cudf
  import numpy
  from cugraph_dgl import CuGraphStorage
  from .utils import assert_same_sampling_len
label_desc: Use image node_id 3 for calling a global function with example usage: test_sampling_heterograph(dgl_graph) without return types