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 __getitem__(self, idx):
      ele = self.triples[idx]
      triple, label = torch.LongTensor(ele["triple"]), np.int32(
          ele["label"]
      )
      trp_label = self.get_label(label)
      # label smoothing
      if self.lbl_smooth != 0.0:
          trp_label = (1.0 - self.lbl_smooth) * trp_label + (
              1.0 / self.num_ent
          )
  
      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 3 for calling the TrainDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: triple,  trp_label