code: def test_same_heterograph_results():
      single_gpu = True
      data_dict = {
          ("B", "BA", "A"): (
              [1, 2, 3, 4, 5, 6, 7, 8],
              [0, 0, 0, 0, 1, 1, 1, 1],
          ),
          ("C", "CA", "A"): (
              [1, 2, 3, 4, 5, 6, 7, 8],
              [0, 0, 0, 0, 1, 1, 1, 1],
          ),
      }
      train_nid = {"A": th.tensor([0])}
      # Create a heterograph with 3 node types and 3 edges types.
      dgl_g = dgl.heterograph(data_dict)
      cugraph_gs = cugraph_storage_from_heterograph(
          dgl_g, single_gpu=single_gpu
      )
  
      dgl_output = sample_dgl_graphs(
          dgl_g, train_nid, [{"BA": 1, "CA": 1}]
      )
      cugraph_output = sample_cugraph_dgl_graphs(
          cugraph_gs, train_nid, [2]
      )
  
      cugraph_output_nodes = (
          cugraph_output[0]["output_nodes"]["A"].cpu().numpy()
      )
      dgl_output_nodes = (
          dgl_output[0]["output_nodes"]["A"].cpu().numpy()
      )
      np.testing.assert_array_equal(
          cugraph_output_nodes, dgl_output_nodes
      )
      assert (
          dgl_output[0]["blocks"][0].num_edges()
          == cugraph_output[0]["blocks"][0].num_edges()
      )
      assert (
          dgl_output[0]["blocks"][0].num_dst_nodes()
          == cugraph_output[0]["blocks"][0].num_dst_nodes()
      )
  
file_path: cugraph/python/cugraph-dgl/tests/test_dataloader.py
imports: import pytest
  import dgl
  import torch
  from cugraph_dgl import cugraph_storage_from_heterograph
  import tempfile
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: test_same_heterograph_results() without return types