code: def __call__(self, datas):
      assert isinstance(datas, list)
      batch_id = 0
      batch_num_points = 0
      removed_sample = False
      datas_out = []
      for batch_id, d in enumerate(datas):
          num_points = datas[batch_id].pos.shape[0]
          batch_num_points += num_points
          if self._num_points and batch_num_points > self._num_points:
              batch_num_points -= num_points
              removed_sample = True
              continue
          datas_out.append(d)
  
      if removed_sample:
          num_full_points = sum(len(d.pos) for d in datas)
          num_full_batch_size = len(datas_out)
          log.warning(
              f"\t\tCannot fit {num_full_points} points into {self._num_points} points "
              f"limit. Truncating batch size at {num_full_batch_size} out of {len(datas)} with {batch_num_points}."
          )
      return datas_out
  
imports: import logging
label_desc: Use image node_id 2 for calling the ClampBatchSize obj's underlying member method code with example usage: obj.__call__(datas) and returns: datas_out