code: def read(self):
      if self.in_path != None:
          self.lib.setInPath(
              ctypes.create_string_buffer(
                  self.in_path.encode(), len(self.in_path) * 2
              )
          )
      else:
          self.lib.setTrainPath(
              ctypes.create_string_buffer(
                  self.tri_file.encode(), len(self.tri_file) * 2
              )
          )
          self.lib.setEntPath(
              ctypes.create_string_buffer(
                  self.ent_file.encode(), len(self.ent_file) * 2
              )
          )
          self.lib.setRelPath(
              ctypes.create_string_buffer(
                  self.rel_file.encode(), len(self.rel_file) * 2
              )
          )
  
      self.lib.setBern(self.bern)
      self.lib.setWorkThreads(self.work_threads)
      self.lib.randReset()
      self.lib.importTrainFiles()
      self.relTotal = self.lib.getRelationTotal()
      self.entTotal = self.lib.getEntityTotal()
      self.tripleTotal = self.lib.getTrainTotal()
  
      if self.batch_size == None:
          self.batch_size = self.tripleTotal // self.nbatches
      if self.nbatches == None:
          self.nbatches = self.tripleTotal // self.batch_size
      self.batch_seq_size = self.batch_size * (
          1 + self.negative_ent + self.negative_rel
      )
  
      self.batch_h = np.zeros(self.batch_seq_size, dtype=np.int64)
      self.batch_t = np.zeros(self.batch_seq_size, dtype=np.int64)
      self.batch_r = np.zeros(self.batch_seq_size, dtype=np.int64)
      self.batch_y = np.zeros(self.batch_seq_size, dtype=np.float32)
      self.batch_h_addr = self.batch_h.__array_interface__["data"][0]
      self.batch_t_addr = self.batch_t.__array_interface__["data"][0]
      self.batch_r_addr = self.batch_r.__array_interface__["data"][0]
      self.batch_y_addr = self.batch_y.__array_interface__["data"][0]
  
imports: import os
  import ctypes
  import numpy
label_desc: Use image node_id 2 for calling the TrainDataLoader obj's underlying member method code with example usage: obj.read() without return types