code: def create_dataloader(g, train_idx, batch_size, fanouts, use_uva):
      """
      Create a DGL dataloader from a DGL graph.
      Args:
          g: DGLGraph to create the dataloader from.
          train_idx: Tensor containing the training indices.
          batch_size: Batch size to use for the dataloader.
          fanouts: List of fanouts to use for the dataloader.
          use_uva: Whether to use unified virtual address space.
      Returns:
          DGLGraph: DGLGraph with the loaded dataset.
      """
  
      print("Creating dataloader", flush=True)
      st = time.time()
      if use_uva:
          train_idx = {k: v.to("cuda") for k, v in train_idx.items()}
      sampler = dgl.dataloading.MultiLayerNeighborSampler(
          fanouts=fanouts
      )
      dataloader = dgl.dataloading.DataLoader(
          g,
          train_idx,
          sampler,
          num_workers=0,
          batch_size=batch_size,
          use_uva=use_uva,
          shuffle=False,
          drop_last=False,
      )
      et = time.time()
      print(f"Time to create dataloader = {et - st:.2f} seconds")
      return dataloader
  
file_path: cugraph/benchmarks/cugraph-dgl/python-script/dgl_dataloading_benchmark/dgl_benchmark.py
imports: import dgl
  import torch
  import pandas
  import os
  import time
  import json
  import random
  import numpy
  from argparse import ArgumentParser
label_desc: Use image node_id 4 for calling a global function with example usage: create_dataloader(g, train_idx, batch_size, fanouts, use_uva) and returns: dataloader