code: def __init__(
      self,
      triples,
      nentity,
      nrelation,
      negative_sample_size,
      mode,
      count,
      true_head,
      true_tail,
  ):
      self.len = len(triples["head"])
      self.triples = triples
      self.nentity = nentity
      self.nrelation = nrelation
      self.negative_sample_size = negative_sample_size
      self.mode = mode
      self.count = count
      self.true_head = true_head
      self.true_tail = true_tail
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import torch
  from torch.utils.data import Dataset
label_desc: Use image node_id 1 to create a new TrainDataset object from inherited base classes: Dataset with example: obj = TrainDataset(triples, nentity, nrelation, negative_sample_size, mode, count, true_head, true_tail)