code: def _batchify(self, batch_data, batch_label, start=0):
          
          i = start
          batch_size = self.batch_size
          try:
              while i < batch_size:
                  label, s = self.next_sample()
                  data = self.imdecode(s)
                  try:
                      self.check_valid_image([data])
                      label = self._parse_label(label)
                      data, label = self.augmentation_transform(data, label)
                      self._check_valid_label(label)
                  except RuntimeError as e:
                      logging.debug('Invalid image, skipping:  %s', str(e))
                      continue
                  for datum in [data]:
                      assert i < batch_size, 'Batch size must be multiples of augmenter output length'
                      batch_data[i] = self.postprocess_data(datum)
                      num_object = label.shape[0]
                      batch_label[i][0:num_object] = nd.array(label)
                      if num_object < batch_label[i].shape[0]:
                          batch_label[i][num_object:] = -1
                      i += 1
          except StopIteration:
              if not i:
                  raise StopIteration
  
          return i
docs: Override the helper function for batchifying data