  
  _EXTRACT_RATIOS = dict(legacy=0.375, face=0.5, head=0.625)
  
  
  def get_matrix_scaling(matrix):
      """ Given a matrix, return the cv2 Interpolation method and inverse interpolation method for
      applying the matrix on an image.
  
      Parameters
      ----------
 
</s> remove def transform_image(image, matrix, size, padding=0):
 </s> add def transform_image(image: np.ndarray,
                    matrix: np.ndarray,
                    size: int,
                    padding: int = 0) -> np.ndarray: </s> remove     logger.trace("interpolator: %s, inverse interpolator: %s", interpolators[0], interpolators[1])
 </s> add     logger.trace("interpolator: %s, inverse interpolator: %s",  # type: ignore
                 interpolators[0], interpolators[1]) </s> remove     def extract_face(self, image):
 </s> add     def extract_face(self, image: Optional[np.ndarray]) -> Optional[np.ndarray]: </s> remove     def offset(self):
 </s> add     def offset(self) -> Dict[CenteringType, np.ndarray]:
def get_matrix_scaling(matrix: np.ndarray) -> Tuple[int, int]:
  
  _EXTRACT_RATIOS = dict(legacy=0.375, face=0.5, head=0.625)
  
  
def get_matrix_scaling(matrix: np.ndarray) -> Tuple[int, int]:
      """ Given a matrix, return the cv2 Interpolation method and inverse interpolation method for
      applying the matrix on an image.
  
      Parameters
      ----------
keep keep keep keep 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