code: def create_dataloader(
      args,
      graph,
      features,
      itemset,
      device,
      drop_last=False,
      shuffle=True,
      drop_uneven_inputs=False,
  ):
      ############################################################################
      # [HIGHLIGHT]
      # Get a GraphBolt dataloader for node classification tasks with multi-gpu
      # distributed training. DistributedItemSampler instead of ItemSampler should
      # be used.
      ############################################################################
  
      ############################################################################
      # [Note]:
      # gb.DistributedItemSampler()
      # [Input]:
      # 'item_set': The current dataset. (e.g. `train_set` or `valid_set`)
      # 'batch_size': Specifies the number of samples to be processed together,
      # referred to as a 'mini-batch'. (The term 'mini-batch' is used here to
      # indicate a subset of the entire dataset that is processed together. This
      # is in contrast to processing the entire dataset, known as a 'full batch'.)
      # 'drop_last': Determines whether the last non-full minibatch should be
      # dropped.
      # 'shuffle': Determines if the items should be shuffled.
      # 'num_replicas': Specifies the number of replicas.
      # 'drop_uneven_inputs': Determines whether the numbers of minibatches on all
      # ranks should be kept the same by dropping uneven minibatches.
      # [Output]:
      # An DistributedItemSampler object for handling mini-batch sampling on
      # multiple replicas.
      ############################################################################
      datapipe = gb.DistributedItemSampler(
          item_set=itemset,
          batch_size=args.batch_size,
          drop_last=drop_last,
          shuffle=shuffle,
          drop_uneven_inputs=drop_uneven_inputs,
      )
      datapipe = datapipe.sample_neighbor(graph, args.fanout)
      datapipe = datapipe.fetch_feature(
          features, node_feature_keys=["feat"]
      )
  
      ############################################################################
      # [Note]:
      # datapipe.copy_to() / gb.CopyTo()
      # [Input]:
      # 'device': The specified device that data should be copied to.
      # [Output]:
      # A CopyTo object copying data in the datapipe to a specified device.\
      ############################################################################
      datapipe = datapipe.copy_to(device)
      dataloader = gb.DataLoader(datapipe, num_workers=args.num_workers)
  
      # Return the fully-initialized DataLoader object.
      return dataloader
  
imports: import argparse
  import os
  import time
  import dgl.graphbolt
  import dgl.nn
  import torch
  import torch.distributed
  import torch.multiprocessing
  import torch.nn
  import torch.nn.functional
  import torchmetrics.functional
  import tqdm
  from torch.distributed.algorithms.join import Join
  from torch.nn.parallel import DistributedDataParallel
label_desc: Use image node_id 1 for calling a global function with example usage: create_dataloader(args, graph, features, itemset, device, drop_last, shuffle, drop_uneven_inputs) and returns: dataloader