          """
          if centering == self.stored_centering:
              return
  
          src_size = self.stored_size - (self.stored_size * _EXTRACT_RATIOS[self.stored_centering])
          offset *= ((self.stored_size - (src_size / 2)) / 2)
          center = np.rint(offset + self.stored_size / 2).astype("int32")
  
          crop_size = get_centered_size(self.stored_centering, centering, self.stored_size)
          roi = np.array([center - crop_size // 2, center + crop_size // 2]).ravel()
  
          self._sub_crop["size"] = crop_size
          self._sub_crop["slice_in"] = [slice(max(roi[1], 0), max(roi[3], 0)),
                                        slice(max(roi[0], 0), max(roi[2], 0))]
 
</s> remove         self._sub_crop["size"] = crop_size
        self._sub_crop["slice_in"] = [slice(max(roi[1], 0), max(roi[3], 0)),
                                      slice(max(roi[0], 0), max(roi[2], 0))]
        self._sub_crop["slice_out"] = [
 </s> add         self._sub_crop_size = crop_size
        self._sub_crop_slices["in"] = [slice(max(roi[1], 0), max(roi[3], 0)),
                                       slice(max(roi[0], 0), max(roi[2], 0))]
        self._sub_crop_slices["out"] = [ </s> remove         if centering == self.stored_centering:
 </s> add         if centering == self.stored_centering and coverage_ratio == 1.0: </s> remove         logger.trace("src_size: %s, roi: %s, sub_crop: %s", src_size, roi, self._sub_crop)
 </s> add         logger.trace("src_size: %s, coverage_ratio: %s, sub_crop_size: %s, ",  # type: ignore
                     "sub_crop_slices: %s", roi, coverage_ratio, self._sub_crop_size,
                     self._sub_crop_slices) </s> remove             mask = np.float32(mask) / 255.
        return mask

    def _crop_to_coverage(self, mask: np.ndarray) -> np.ndarray:
        """ Crop the mask to the correct dimensions based on coverage ratio.

        Parameters
        ----------
        mask: :class:`numpy.ndarray`
            The original mask to be cropped

        Returns
        -------
        :class:`numpy.ndarray`
            The cropped mask
        """
        if self._coverage_ratio == 1.0:
            return mask
        mask_size = mask.shape[0]
        padding = round((mask_size * (1 - self._coverage_ratio)) / 2)
        mask_slice = slice(padding, mask_size - padding)
        mask = mask[mask_slice, mask_slice, :]
        logger.trace("mask_size: %s, coverage: %s, padding: %s, final shape: %s",  # type: ignore
                     mask_size, self._coverage_ratio, padding, mask.shape)
        return mask
 </s> add             face_mask = face_mask.astype("float32") / 255.
        return face_mask </s> remove             mask = cv2.resize(mask,
                              self._box.shape[:2],
                              interpolation=interp)[..., None].astype("float32") / 255.
 </s> add             face_mask = cv2.resize(face_mask,
                                   self._box.shape[:2],
                                   interpolation=interp)[..., None].astype("float32") / 255.
        center = get_adjusted_center(self.stored_size,
                                     source_offset,
                                     target_offset,
                                     self.stored_centering)
        crop_size = get_centered_size(self.stored_centering,
                                      centering,
                                      self.stored_size,
                                      coverage_ratio=coverage_ratio)
          """
          if centering == self.stored_centering:
              return
  
        center = get_adjusted_center(self.stored_size,
                                     source_offset,
                                     target_offset,
                                     self.stored_centering)
        crop_size = get_centered_size(self.stored_centering,
                                      centering,
                                      self.stored_size,
                                      coverage_ratio=coverage_ratio)
        center = get_adjusted_center(self.stored_size,
                                     source_offset,
                                     target_offset,
                                     self.stored_centering)
        crop_size = get_centered_size(self.stored_centering,
                                      centering,
                                      self.stored_size,
                                      coverage_ratio=coverage_ratio)
        center = get_adjusted_center(self.stored_size,
                                     source_offset,
                                     target_offset,
                                     self.stored_centering)
        crop_size = get_centered_size(self.stored_centering,
                                      centering,
                                      self.stored_size,
                                      coverage_ratio=coverage_ratio)
        center = get_adjusted_center(self.stored_size,
                                     source_offset,
                                     target_offset,
                                     self.stored_centering)
        crop_size = get_centered_size(self.stored_centering,
                                      centering,
                                      self.stored_size,
                                      coverage_ratio=coverage_ratio)
        center = get_adjusted_center(self.stored_size,
                                     source_offset,
                                     target_offset,
                                     self.stored_centering)
        crop_size = get_centered_size(self.stored_centering,
                                      centering,
                                      self.stored_size,
                                      coverage_ratio=coverage_ratio)
          roi = np.array([center - crop_size // 2, center + crop_size // 2]).ravel()
  
          self._sub_crop["size"] = crop_size
          self._sub_crop["slice_in"] = [slice(max(roi[1], 0), max(roi[3], 0)),
                                        slice(max(roi[0], 0), max(roi[2], 0))]
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 lib.detected_face.Mask
  - Add source + target offset and coverage to set_sub_crop method 
lib/align/detected_face.py