          with self._cache["average_distance"][1]:
              if self._cache["average_distance"][0] is None:
                  # pylint:disable=unsubscriptable-object
                  average_distance = np.mean(np.abs(self.normalized_landmarks[17:] - _MEAN_FACE))
                  logger.trace("average_distance: %s", average_distance)
                  self._cache["average_distance"][0] = average_distance
          return self._cache["average_distance"][0]
  
      @classmethod
      def _set_cache(cls):
          """ Set the cache items.
  
 
</s> remove         with self._cache["average_distance"][1]:
            if self._cache["average_distance"][0] is None:
                # pylint:disable=unsubscriptable-object
 </s> add         with self._cache.lock("average_distance"):
            if not self._cache.average_distance: </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     def average_distance(self):
 </s> add     def average_distance(self) -> float: </s> remove         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.
 </s> add         Parameters
        ----------
        size: int
            The final size of the aligned image in pixels
        coverage_ratio: float
            The ratio of the final image to pad to </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:
                logger.trace("average_distance: %s", average_distance)  # type: ignore
                self._cache.average_distance = average_distance
        return self._cache.average_distance
          with self._cache["average_distance"][1]:
              if self._cache["average_distance"][0] is None:
                  # pylint:disable=unsubscriptable-object
                  average_distance = np.mean(np.abs(self.normalized_landmarks[17:] - _MEAN_FACE))
                logger.trace("average_distance: %s", average_distance)  # type: ignore
                self._cache.average_distance = average_distance
        return self._cache.average_distance
                logger.trace("average_distance: %s", average_distance)  # type: ignore
                self._cache.average_distance = average_distance
        return self._cache.average_distance
                logger.trace("average_distance: %s", average_distance)  # type: ignore
                self._cache.average_distance = average_distance
        return self._cache.average_distance
  
      @classmethod
      def _set_cache(cls):
          """ Set the cache items.
  
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