class_docstr: Training Dataset class.
  Parameters
  ----------
  triples: The triples used for training the model
  num_ent: Number of entities in the knowledge graph
  lbl_smooth: Label smoothing
  
  Returns
  -------
  A training Dataset class instance used by DataLoader
code: def collate_fn(data):
      triples = []
      labels = []
      for triple, label in data:
          triples.append(triple)
          labels.append(label)
      triple = torch.stack(triples, dim=0)
      trp_label = torch.stack(labels, dim=0)
      return triple, trp_label
  
imports: from collections import defaultdict
  import dgl
  import numpy
  import torch
  from ordered_set import OrderedSet
  from torch.utils.data import DataLoader, Dataset
label_desc: Use image node_id 4 for calling the TrainDataset obj's underlying member method code with example usage: obj.collate_fn(data) and returns: triple,  trp_label