      @classmethod
      def _set_cache(cls):
          """ Set the cache items.
  
          Items are cached so that they are only created the first time they are called.
          Each item includes a threading lock to make cache creation thread safe.
  
          Returns
          -------
          dict
              The Aligned Face cache
 
</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. </s> remove             The Aligned Face cache
 </s> add             The padding required, in pixels for 'head', 'face' and 'legacy' face types </s> remove                 logger.trace("average_distance: %s", average_distance)
                self._cache["average_distance"][0] = average_distance
        return self._cache["average_distance"][0]
 </s> add                 logger.trace("average_distance: %s", average_distance)  # type: ignore
                self._cache.average_distance = average_distance
        return self._cache.average_distance </s> remove         return dict(pose=[None, Lock()],
                    original_roi=[None, Lock()],
                    landmarks=[None, Lock()],
                    landmarks_normalized=[None, Lock()],
                    average_distance=[None, Lock()],
                    adjusted_matrix=[None, Lock()],
                    interpolators=[None, Lock()],
                    head_size=[dict(), Lock()],
                    cropped_roi=[dict(), Lock()],
                    cropped_size=[dict(), Lock()],
                    cropped_slices=[dict(), Lock()])

    def transform_points(self, points, invert=False):
 </s> add         retval = {_type: round((size * (coverage_ratio - (1 - _EXTRACT_RATIOS[_type]))) / 2)
                  for _type in get_args(Literal["legacy", "face", "head"])}
        logger.trace(retval)  # type: ignore
        return retval

    def transform_points(self, points: np.ndarray, invert: bool = False) -> np.ndarray: </s> remove     def _get_camera_matrix(cls):
 </s> add     def _get_camera_matrix(cls) -> np.ndarray:
        Parameters
        ----------
        size: int
            The final size of the aligned image in pixels
        coverage_ratio: float
            The ratio of the final image to pad to
      @classmethod
      def _set_cache(cls):
          """ Set the cache items.
  
        Parameters
        ----------
        size: int
            The final size of the aligned image in pixels
        coverage_ratio: float
            The ratio of the final image to pad to
        Parameters
        ----------
        size: int
            The final size of the aligned image in pixels
        coverage_ratio: float
            The ratio of the final image to pad to
  
          Returns
          -------
          dict
              The Aligned Face cache
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