code: def collate(samples):
      # The input `samples` is a list of pairs (graph, label).
      graphs, labels = map(list, zip(*samples))
      for g in graphs:
          # deal with node feats
          for key in g.node_attr_schemes().keys():
              g.ndata[key] = nd.array(g.ndata[key])
          # no edge feats
      batched_graph = dgl.batch(graphs)
      labels = [nd.reshape(label, (1,)) for label in labels]
      labels = nd.concat(*labels, dim=0)
      return batched_graph, labels
  
file_path: dgl/examples/mxnet/gin/dataloader.py
imports: import math
  import dgl
  import numpy
  from mxnet import nd
  from mxnet.gluon.data import DataLoader, Sampler
  from sklearn.model_selection import StratifiedKFold
label_desc: Use image node_id 1 for calling a global function with example usage: collate(samples) and returns: batched_graph,  labels