code: def __head_batch(self, h, t, r, neg_size):
      # return torch.randint(low = 0, high = self.ent_total, size = (neg_size, )).numpy()
      neg_list = []
      neg_cur_size = 0
      while neg_cur_size < neg_size:
          neg_tmp = self.__corrupt_head(
              t, r, num_max=(neg_size - neg_cur_size) * 2
          )
          neg_list.append(neg_tmp)
          neg_cur_size += len(neg_tmp)
      return np.concatenate(neg_list)[:neg_size]
  
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 10 for calling the PyTorchTrainDataset obj's underlying member method code with example usage: obj.__head_batch(h, t, r, neg_size) and returns: np