              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
  
      def _collect_item(self, queue: "Queue") -> Union[Literal["EOF"], ExtractMedia]:
          """ Collect the item from the :attr:`_rollover` dict or from the queue. Add face count per
          frame to self._faces_per_filename for joining batches back up in finalize
 
</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         if batch:
            logger.trace("Returning batch: %s", {k: v.shape  # type:ignore
                                                 if isinstance(v, np.ndarray) else v
 </s> add         if batch.filename:
            logger.trace("Returning batch: %s", {k: len(v)  # type:ignore
                                                 if isinstance(v, list) else v </s> remove                 self._filter.output_counts()
 </s> add 
            logger.debug(item)  # type:ignore

        # TODO Move to end of process not beginning
        self._filter.output_counts()

              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.debug(item)  # type:ignore

        # TODO Move to end of process not beginning
        self._filter.output_counts()

          return exhausted, batch
  
      def _collect_item(self, queue: "Queue") -> Union[Literal["EOF"], ExtractMedia]:
          """ Collect the item from the :attr:`_rollover` dict or from the queue. Add face count per
          frame to self._faces_per_filename for joining batches back up in finalize
keep keep keep keep replace keep keep keep keep keep
 bugfix: Extract - don't put empty batches through aligner 
plugins/extract/align/_base.py