      @property
      def original_roi(self):
          """ :class:`numpy.ndarray`: The location of the extracted face box within the original
          frame. """
          with self._cache["original_roi"][1]:
              if self._cache["original_roi"][0] is None:
                  roi = np.array([[0, 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")
 
</s> remove                 logger.trace("original roi: %s", roi)
                self._cache["original_roi"][0] = roi
        return self._cache["original_roi"][0]
 </s> add                 logger.trace("original roi: %s", roi)  # type: ignore
                self._cache.original_roi = roi
        return self._cache.original_roi[0] </s> remove     def original_roi(self):
 </s> add     def original_roi(self) -> np.ndarray: </s> remove     def landmarks(self):
 </s> add     def landmarks(self) -> np.ndarray: </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                 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]
        with self._cache.lock("original_roi"):
            if self._cache.original_roi is None:
      @property
      def original_roi(self):
          """ :class:`numpy.ndarray`: The location of the extracted face box within the original
          frame. """
        with self._cache.lock("original_roi"):
            if self._cache.original_roi is None:
        with self._cache.lock("original_roi"):
            if self._cache.original_roi is None:
                  roi = np.array([[0, 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")
keep keep keep keep 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