code: def filter_batch(self, batch):
          
          for item in batch:
              if self.filter(item):
                  yield item
              else:
                  self.set_metadata('filtered_out',
                                    self.get_metadata('filtered_out') + 1)
  
              self.total += 1
              self._log_progress()
docs: Receives the batch, filters it, and returns it.