code: def collate_dgl(samples):
      graphs, labels = map(list, zip(*samples))
      batched_graph = dgl.batch(graphs)
  
      if isinstance(labels[0], torch.Tensor):
          return batched_graph, torch.stack(labels)
      else:
          return batched_graph, labels
  
file_path: ogb/ogb/graphproppred/dataset_dgl.py
imports: import pandas
  import shutil, os
  import os.path
  import torch
  import numpy
  from dgl.data.utils import load_graphs, save_graphs, Subset
  import dgl
  from ogb.utils.url import decide_download, download_url, extract_zip
  from ogb.io.read_graph_dgl import read_graph_dgl
label_desc: Use image node_id 1 for calling a global function with example usage: collate_dgl(samples) and returns: batched_graph,  torch, batched_graph,  labels