          for i, frame in enumerate(reader):
              # Convert to BGR for cv2 compatibility
              frame = frame[:, :, ::-1]
              filename = f"{vidname}_{i + 1:06d}.png"
              logger.trace("Loading video frame: '%s'", filename)  # type: ignore
              yield filename, frame
          reader.close()
  
      def load_one_image(self, filename) -> np.ndarray:
          """ Obtain a single image for the given filename.
 
</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)): </s> remove         logger.trace("Loading image: '%s'", filename)  # type: ignore
 </s> add         logger.trace("Loading image: '%s'", filename)  # type:ignore[attr-defined] </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         frame = reader.get_next_data()[:, :, ::-1]
 </s> add         frame = reader.get_next_data()[:, :, ::-1]  # type:ignore[index] </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]
            logger.trace("Loading video frame: '%s'", filename)  # type:ignore[attr-defined]
          for i, frame in enumerate(reader):
              # Convert to BGR for cv2 compatibility
              frame = frame[:, :, ::-1]
              filename = f"{vidname}_{i + 1:06d}.png"
            logger.trace("Loading video frame: '%s'", filename)  # type:ignore[attr-defined]
              yield filename, frame
          reader.close()
  
      def load_one_image(self, filename) -> np.ndarray:
          """ Obtain a single image for the given filename.
keep keep keep keep replace keep keep keep keep keep
 tests:
  - unit test: tools.alignments.media
  - Add mypy test
  - Typing fixes 
scripts/fsmedia.py