  import logging
  import sys
  from threading import Lock
  
  import cv2
  import numpy as np
  
  if sys.version_info < (3, 8):
      from typing_extensions import get_args, Literal
 
</s> remove     from typing_extensions import Literal
 </s> add     from typing_extensions import get_args, Literal </s> remove     from typing import Literal
 </s> add     from typing import get_args, Literal </s> remove         if self._is_aligned and self._centering != "head":  # Crop out the sub face from full head
 </s> add         if self._is_aligned and (self._centering != self._source_centering or
                                 self._coverage_ratio != 1.0):
            # Crop out the sub face from full head </s> remove     def _set_cache(cls):
        """ Set the cache items.
 </s> add     def _padding_from_coverage(cls, size: int, coverage_ratio: float) -> Dict[CenteringType, int]:
        """ Return the image padding for a face from coverage_ratio set against a
            pre-padded training image.
from typing import Dict, Optional, Tuple

  import logging
  import sys
  from threading import Lock
from typing import Dict, Optional, Tuple

  
  import cv2
  import numpy as np
  
  if sys.version_info < (3, 8):
      from typing_extensions import get_args, Literal
keep keep add keep keep keep keep keep keep
 lib.align.aligned_face updates
  - Typing
  - Legacy support for pre-aligned faces
  - Coverage support for pre-aligned faces
  - Standardized retrieval of sub-crops 
lib/align/aligned_face.py