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
  
imports: import os
  import os.path
  import shutil
  from ogb.utils import smiles2graph
  from ogb.utils.torch_util import replace_numpy_with_torchtensor
  from ogb.utils.url import decide_download, download_url, extract_zip
  import pandas
  import numpy
  from dgl.data.utils import load_graphs, save_graphs, Subset
  import dgl
  from tqdm.auto import tqdm
  import torch
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