code: def sample_cugraph_dgl_graphs(cugraph_gs, train_nid, fanouts):
      sampler = cugraph_dgl.dataloading.NeighborSampler(fanouts)
      tempdir_object = tempfile.TemporaryDirectory()
      sampling_output_dir = tempdir_object
      dataloader = cugraph_dgl.dataloading.DataLoader(
          cugraph_gs,
          train_nid,
          sampler,
          batch_size=1,
          sampling_output_dir=sampling_output_dir.name,
          drop_last=False,
          shuffle=False,
      )
  
      cugraph_dgl_output = {}
      for batch_id, (input_nodes, output_nodes, blocks) in enumerate(
          dataloader
      ):
          cugraph_dgl_output[batch_id] = {
              "input_nodes": input_nodes,
              "output_nodes": output_nodes,
              "blocks": blocks,
          }
      return cugraph_dgl_output
  
file_path: cugraph/python/cugraph-dgl/tests/mg/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 2 for calling a global function with example usage: sample_cugraph_dgl_graphs(cugraph_gs, train_nid, fanouts) and returns: cugraph_dgl_output