  import cv2
  import numpy as np
  
  if sys.version_info < (3, 8):
      from typing_extensions import Literal
  else:
      from typing import Literal
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
 
</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         # Input image is sized up because of integer rounding
        logger.trace("head_size: %s, image_size: %s, target_size: %s",
                     self._head_size, image.shape[0], self.size)
        if self._head_size != image.shape[0]:
            interp = cv2.INTER_CUBIC if image.shape[0] < self._head_size else cv2.INTER_AREA
            image = cv2.resize(image, (self._head_size, self._head_size), interpolation=interp)

        out = np.zeros((self.size, self.size, image.shape[-1]), dtype=image.dtype)
        slices = self._get_cropped_slices()
 </s> add         logger.trace("image_size: %s, target_size: %s, coverage_ratio: %s",  # type: ignore
                     image.shape[0], self.size, self._coverage_ratio)

        img_size = image.shape[0]
        target_size = get_centered_size(self._source_centering,
                                        self._centering,
                                        img_size,
                                        self._coverage_ratio)
        out = np.zeros((target_size, target_size, image.shape[-1]), dtype=image.dtype)

        slices = self._get_cropped_slices(img_size, target_size)
    from typing_extensions import get_args, Literal
  import cv2
  import numpy as np
  
  if sys.version_info < (3, 8):
    from typing_extensions import get_args, Literal
  else:
      from typing import Literal
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
keep keep keep keep replace 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