code: def sampling_head(self):
      self.lib.sampling(
          self.batch_h_addr,
          self.batch_t_addr,
          self.batch_r_addr,
          self.batch_y_addr,
          self.batch_size,
          self.negative_ent,
          self.negative_rel,
          -1,
          self.filter,
          0,
          0,
      )
      return {
          "batch_h": self.batch_h,
          "batch_t": self.batch_t[: self.batch_size],
          "batch_r": self.batch_r[: self.batch_size],
          "batch_y": self.batch_y,
          "mode": "head_batch",
      }
  
imports: import os
  import ctypes
  import numpy
label_desc: Use image node_id 4 for calling the TrainDataLoader obj's underlying member method code with example usage: obj.sampling_head() and returns: dict