                                  [0, self._size - 1],
                                  [self._size - 1, self._size - 1],
                                  [self._size - 1, 0]])
                  roi = np.rint(self.transform_points(roi, invert=True)).astype("int32")
                  logger.trace("original roi: %s", roi)
                  self._cache["original_roi"][0] = roi
          return self._cache["original_roi"][0]
  
      @property
      def landmarks(self):
          """ :class:`numpy.ndarray`: The 68 point facial landmarks aligned to the extracted face
          box. """
 
</s> remove         with self._cache["original_roi"][1]:
            if self._cache["original_roi"][0] is None:
 </s> add         with self._cache.lock("original_roi"):
            if self._cache.original_roi is None: </s> remove     def landmarks(self):
 </s> add     def landmarks(self) -> np.ndarray: </s> remove         with self._cache["landmarks"][1]:
            if self._cache["landmarks"][0] is None:
 </s> add         with self._cache.lock("landmarks"):
            if self._cache.landmarks is None: </s> remove                 logger.trace("centering: '%s', center: %s, padding: %s, sub roi: %s",
                             centering, center, padding, roi)
                self._cache["cropped_roi"][0][centering] = roi
        return self._cache["cropped_roi"][0][centering]

    def _get_cropped_slices(self):
        """ Obtain the slices to turn a full head extract into an alternatively centered extract.

        Returns
        -------
        dict
            The slices for an input full head image and output cropped image
        """
        with self._cache["cropped_slices"][1]:
            if not self._cache["cropped_slices"][0].get(self._centering):
                roi = self.get_cropped_roi(self._centering)
                slice_in = [slice(max(roi[1], 0), max(roi[3], 0)),
                            slice(max(roi[0], 0), max(roi[2], 0))]
                slice_out = [slice(max(roi[1] * -1, 0),
                                   self._size - min(self._size, max(0, roi[3] - self._head_size))),
                             slice(max(roi[0] * -1, 0),
                                   self._size - min(self._size, max(0, roi[2] - self._head_size)))]
                self._cache["cropped_slices"][0][self._centering] = {"in": slice_in,
                                                                     "out": slice_out}
                logger.trace("centering: %s, cropped_slices: %s",
                             self._centering, self._cache["cropped_slices"][0][self._centering])
        return self._cache["cropped_slices"][0][self._centering]
 </s> add                 logger.trace("centering: '%s', center: %s, padding: %s, "  # type: ignore
                             "sub roi: %s", centering, center, padding, roi)
                self._cache.cropped_roi[centering] = roi
        return self._cache.cropped_roi[centering] </s> remove                 logger.trace("aligned landmarks: %s", lms)
                self._cache["landmarks"][0] = lms
        return self._cache["landmarks"][0]
 </s> add                 logger.trace("aligned landmarks: %s", lms)  # type: ignore
                self._cache.landmarks = lms
            return self._cache.landmarks
                logger.trace("original roi: %s", roi)  # type: ignore
                self._cache.original_roi = roi
        return self._cache.original_roi[0]
                                  [0, self._size - 1],
                                  [self._size - 1, self._size - 1],
                                  [self._size - 1, 0]])
                  roi = np.rint(self.transform_points(roi, invert=True)).astype("int32")
                logger.trace("original roi: %s", roi)  # type: ignore
                self._cache.original_roi = roi
        return self._cache.original_roi[0]
                logger.trace("original roi: %s", roi)  # type: ignore
                self._cache.original_roi = roi
        return self._cache.original_roi[0]
                logger.trace("original roi: %s", roi)  # type: ignore
                self._cache.original_roi = roi
        return self._cache.original_roi[0]
  
      @property
      def landmarks(self):
          """ :class:`numpy.ndarray`: The 68 point facial landmarks aligned to the extracted face
          box. """
keep keep keep keep replace replace 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