          from the cache. """
          assert self._writer is not None
          while self.frame_order:
              if self.frame_order[0] not in self.cache:
                  logger.trace("Next frame not ready. Continuing")  # type: ignore
                  break
              save_no = self.frame_order.pop(0)
              save_image = self.cache.pop(save_no)
              logger.trace("Rendering from cache. Frame no: %s", save_no)  # type: ignore
              self._writer.send(np.ascontiguousarray(save_image[:, :, ::-1]))
 
</s> remove             logger.trace("Rendering from cache. Frame no: %s", save_no)  # type: ignore
 </s> add             logger.trace("Rendering from cache. Frame no: %s",  # type:ignore[attr-defined]
                         save_no) </s> remove         logger.trace("Current cache size: %s", len(self.cache))  # type: ignore
 </s> add         logger.trace("Current cache size: %s", len(self.cache))  # type:ignore[attr-defined] </s> remove         logger.trace("Received frame: (filename: '%s', shape: %s",  # type: ignore
 </s> add         logger.trace("Received frame: (filename: '%s', shape: %s",  # type:ignore[attr-defined] </s> remove         frame = reader.get_next_data()[:, :, ::-1]
 </s> add         frame = reader.get_next_data()[:, :, ::-1]  # type:ignore[index] </s> remove         reader = imageio.get_reader(self._args.input_dir, "ffmpeg")
        for i, frame in enumerate(reader):
 </s> add         reader = imageio.get_reader(self._args.input_dir, "ffmpeg")  # type:ignore[arg-type]
        for i, frame in enumerate(cast(Iterator[np.ndarray], reader)):
                logger.trace("Next frame not ready. Continuing")  # type:ignore[attr-defined]
          from the cache. """
          assert self._writer is not None
          while self.frame_order:
              if self.frame_order[0] not in self.cache:
                logger.trace("Next frame not ready. Continuing")  # type:ignore[attr-defined]
                  break
              save_no = self.frame_order.pop(0)
              save_image = self.cache.pop(save_no)
              logger.trace("Rendering from cache. Frame no: %s", save_no)  # type: ignore
              self._writer.send(np.ascontiguousarray(save_image[:, :, ::-1]))
keep keep keep keep replace keep keep keep keep keep
 tests:
  - unit test: tools.alignments.media
  - Add mypy test
  - Typing fixes 
plugins/convert/writer/ffmpeg.py