                  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]))
          logger.trace("Current cache size: %s", len(self.cache))  # type: ignore
  
      def close(self) -> None:
          """ Close the ffmpeg writer and mux the audio """
 
</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("Next frame not ready. Continuing")  # type: ignore
 </s> add                 logger.trace("Next frame not ready. Continuing")  # 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         logger.trace("Loading video frame: %s", frame_no)  # type: ignore
        reader = imageio.get_reader(self._args.input_dir, "ffmpeg")
 </s> add         logger.trace("Loading video frame: %s", frame_no)  # type:ignore[attr-defined]
        reader = imageio.get_reader(self._args.input_dir, "ffmpeg")  # type:ignore[arg-type] </s> remove             logger.trace("Loading video frame: '%s'", filename)  # type: ignore
 </s> add             logger.trace("Loading video frame: '%s'", filename)  # type:ignore[attr-defined]
            logger.trace("Rendering from cache. Frame no: %s",  # type:ignore[attr-defined]
                         save_no)
                  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",  # type:ignore[attr-defined]
                         save_no)
              self._writer.send(np.ascontiguousarray(save_image[:, :, ::-1]))
          logger.trace("Current cache size: %s", len(self.cache))  # type: ignore
  
      def close(self) -> None:
          """ Close the ffmpeg writer and mux the audio """
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