code: def __normal_batch(self, h, t, r, neg_size):
      neg_size_h = 0
      neg_size_t = 0
      prob = (
          self.rig_mean[r] / (self.rig_mean[r] + self.lef_mean[r])
          if self.bern_flag
          else 0.5
      )
      for i in range(neg_size):
          if random.random() < prob:
              neg_size_h += 1
          else:
              neg_size_t += 1
  
      neg_list_h = []
      neg_cur_size = 0
      while neg_cur_size < neg_size_h:
          neg_tmp_h = self.__corrupt_head(
              t, r, num_max=(neg_size_h - neg_cur_size) * 2
          )
          neg_list_h.append(neg_tmp_h)
          neg_cur_size += len(neg_tmp_h)
      if neg_list_h != []:
          neg_list_h = np.concatenate(neg_list_h)
  
      neg_list_t = []
      neg_cur_size = 0
      while neg_cur_size < neg_size_t:
          neg_tmp_t = self.__corrupt_tail(
              h, r, num_max=(neg_size_t - neg_cur_size) * 2
          )
          neg_list_t.append(neg_tmp_t)
          neg_cur_size += len(neg_tmp_t)
      if neg_list_t != []:
          neg_list_t = np.concatenate(neg_list_t)
  
      return neg_list_h[:neg_size_h], neg_list_t[:neg_size_t]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import random
  import numpy
  import torch
  from torch.utils.data import Dataset, DataLoader
label_desc: Use image node_id 9 for calling the PyTorchTrainDataset obj's underlying member method code with example usage: obj.__normal_batch(h, t, r, neg_size) and returns: neg_list_h,  neg_list_t