  
          Returns
          -------
          :class:`numpy.ndarray`
              The aligned image with the correct centering
          """
          # 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]:
 
</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) </s> remove     logger.trace("image shape: %s, matrix: %s, size: %s. padding: %s",
 </s> add     logger.trace("image shape: %s, matrix: %s, size: %s. padding: %s",  # type: ignore </s> remove         with self._cache["cropped_roi"][1]:
            if centering not in self._cache["cropped_roi"][0]:
                offset = self.pose.offset.get(centering, np.float32((0, 0)))  # legacy = 0.0
                adjusted = offset - self.pose.offset["head"]
                adjusted *= (self._head_size - (self._head_size * _EXTRACT_RATIOS["head"]))

                center = np.rint(adjusted + self._head_size / 2).astype("int32")
                padding = self.size // 2
 </s> add         with self._cache.lock("cropped_roi"):
            if centering not in self._cache.cropped_roi:
                center = get_adjusted_center(image_size,
                                             self.pose.offset[self._source_centering],
                                             self.pose.offset[self.centering],
                                             self._source_centering)
                padding = target_size // 2 </s> remove     def _head_size(self):
        """ int: The size of the full head extract image calculated from the required
        centering. """
        with self._cache["head_size"][1]:
            if self._centering not in self._cache["head_size"][0]:
                self._cache["head_size"][0][self._centering] = get_centered_size(self._centering,
                                                                                 "head",
                                                                                 self.size)
        return self._cache["head_size"][0][self._centering]

    @property
    def pose(self):
 </s> add     def pose(self) -> "PoseEstimate":
            The aligned image with the correct centering, scaled to image input size
  
          Returns
          -------
          :class:`numpy.ndarray`
            The aligned image with the correct centering, scaled to image input size
          """
          # 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]:
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