                          logger.trace("Rolled over %s faces of %s to next batch "  # type:ignore
                                       "for '%s'", len(self._rollover.detected_faces), frame_faces,
                                       item.filename)
                      break
          if batch:
              logger.trace("Returning batch: %s", {k: v.shape  # type:ignore
                                                   if isinstance(v, np.ndarray) else v
                                                   for k, v in batch.__dict__.items()})
          else:
              logger.trace(item)  # type:ignore
          return exhausted, batch
  
 
</s> remove                     if batch:
 </s> add                     # TODO Move all batch items to common dataclass. Currently migrated:
                    # Align
                    if (isinstance(batch, dict) and batch or
                            not isinstance(batch, dict) and batch.filename): </s> remove             logger.trace(item)  # type:ignore
 </s> add             logger.debug(item)  # type:ignore

        # TODO Move to end of process not beginning
        self._filter.output_counts()
 </s> remove                 self._filter.output_counts()
 </s> add 
        if batch.filename:
            logger.trace("Returning batch: %s", {k: len(v)  # type:ignore
                                                 if isinstance(v, list) else v
                          logger.trace("Rolled over %s faces of %s to next batch "  # type:ignore
                                       "for '%s'", len(self._rollover.detected_faces), frame_faces,
                                       item.filename)
                      break
        if batch.filename:
            logger.trace("Returning batch: %s", {k: len(v)  # type:ignore
                                                 if isinstance(v, list) else v
        if batch.filename:
            logger.trace("Returning batch: %s", {k: len(v)  # type:ignore
                                                 if isinstance(v, list) else v
        if batch.filename:
            logger.trace("Returning batch: %s", {k: len(v)  # type:ignore
                                                 if isinstance(v, list) else v
                                                   for k, v in batch.__dict__.items()})
          else:
              logger.trace(item)  # type:ignore
          return exhausted, batch
  
keep keep keep keep replace replace replace keep keep keep keep keep
 bugfix: Extract - don't put empty batches through aligner 
plugins/extract/align/_base.py