              del_keys = [key for key, val in data.items() if not val["faces"]]
              logger.debug("Frames with no faces selected for redetection: %s", len(del_keys))
              for key in del_keys:
                  if key in data:
                      logger.trace("Selected for redetection: '%s'", key)  # type: ignore
                      del data[key]
          return data
  
  
  class Images():
 
</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 video frame: '%s'", filename)  # type: ignore
 </s> add             logger.trace("Loading video frame: '%s'", filename)  # type:ignore[attr-defined] </s> remove         logger.trace("Loading image: '%s'", filename)  # type: ignore
 </s> add         logger.trace("Loading image: '%s'", filename)  # type:ignore[attr-defined] </s> remove         retval: list[str] = []
 </s> add         retval: List[str] = [] </s> remove             logger.trace("Drawing Landmarks. Frame: '%s'. Face: %s", frame, idx)  # type: ignore
 </s> add             logger.trace("Drawing Landmarks. Frame: '%s'. Face: %s",  # type:ignore[attr-defined]
                         frame, idx)
                    logger.trace("Selected for redetection: '%s'",  # type:ignore[attr-defined]
                                 key)
              del_keys = [key for key, val in data.items() if not val["faces"]]
              logger.debug("Frames with no faces selected for redetection: %s", len(del_keys))
              for key in del_keys:
                  if key in data:
                    logger.trace("Selected for redetection: '%s'",  # type:ignore[attr-defined]
                                 key)
                      del data[key]
          return data
  
  
  class Images():
keep keep keep keep replace keep keep keep keep keep
 tests:
  - unit test: tools.alignments.media
  - Add mypy test
  - Typing fixes 
scripts/fsmedia.py