  import numpy as np
  from tqdm import tqdm
  
  from lib.align import DetectedFace, _EXTRACT_RATIOS
  from lib.align.alignments import _VERSION
  from lib.image import encode_image, generate_thumbnail, ImagesSaver
  from plugins.extract.pipeline import Extractor, ExtractMedia
  from .media import ExtractedFaces, Frames
  
  if sys.version_info < (3, 8):
 
</s> remove from typing import cast, Dict, List, Optional, TYPE_CHECKING, Union
 </s> add from typing import cast, Dict, List, Optional, Tuple, TYPE_CHECKING, Union </s> remove from typing import List, Optional, TYPE_CHECKING
 </s> add from typing import Dict, List, Optional, TYPE_CHECKING </s> remove from typing import Any, Dict, Generator, List, Optional, Tuple, TYPE_CHECKING, Union
 </s> add from typing import (Any, cast, Dict, Generator, Iterator, List,
                    Optional, Tuple, TYPE_CHECKING, Union) </s> remove     from imageio.plugins.pillowmulti import GIFFormat
 </s> add     from imageio.core import format as im_format  # noqa:F401
from lib.align.alignments import _VERSION, PNGHeaderDict
  import numpy as np
  from tqdm import tqdm
  
  from lib.align import DetectedFace, _EXTRACT_RATIOS
from lib.align.alignments import _VERSION, PNGHeaderDict
  from lib.image import encode_image, generate_thumbnail, ImagesSaver
  from plugins.extract.pipeline import Extractor, ExtractMedia
  from .media import ExtractedFaces, Frames
  
  if sys.version_info < (3, 8):
keep keep keep keep replace keep keep keep keep keep
 tests:
  - unit test: tools.alignments.media
  - Add mypy test
  - Typing fixes 
tools/alignments/jobs_frames.py