          """
          zoom = self.stored_size / mask_size
          zoom_mat = np.array([[zoom, 0, 0.], [0, zoom, 0.]])
          adjust_mat = np.dot(zoom_mat, np.concatenate((affine_matrix, np.array([[0., 0., 1.]]))))
          logger.trace("storage_size: %s, mask_size: %s, zoom: %s, original matrix: %s, "
                       "adjusted_matrix: %s", self.stored_size, mask_size, zoom, affine_matrix.shape,
                       adjust_mat.shape)
          return adjust_mat
  
      def to_dict(self):
          """ Convert the mask to a dictionary for saving to an alignments file
  
 
</s> remove         affine_matrix: numpy,ndarray
 </s> add         affine_matrix: :class:`numpy,ndarray` </s> remove     def to_dict(self):
 </s> add     def to_dict(self, is_png=False) -> MaskAlignmentsFileDict: </s> remove         logger.trace("mask shape: %s, mask dtype: %s, mask min: %s, mask max: %s, "
 </s> add         logger.trace("mask shape: %s, mask dtype: %s, mask min: %s, mask max: %s, "  # type: ignore </s> remove     def _adjust_affine_matrix(self, mask_size, affine_matrix):
 </s> add     def _adjust_affine_matrix(self, mask_size: int, affine_matrix: np.ndarray) -> np.ndarray:
        logger.trace("storage_size: %s, mask_size: %s, zoom: %s, "  # type: ignore
                     "original matrix: %s, adjusted_matrix: %s", self.stored_size, mask_size, zoom,
                     affine_matrix.shape, adjust_mat.shape)
          """
          zoom = self.stored_size / mask_size
          zoom_mat = np.array([[zoom, 0, 0.], [0, zoom, 0.]])
          adjust_mat = np.dot(zoom_mat, np.concatenate((affine_matrix, np.array([[0., 0., 1.]]))))
        logger.trace("storage_size: %s, mask_size: %s, zoom: %s, "  # type: ignore
                     "original matrix: %s, adjusted_matrix: %s", self.stored_size, mask_size, zoom,
                     affine_matrix.shape, adjust_mat.shape)
        logger.trace("storage_size: %s, mask_size: %s, zoom: %s, "  # type: ignore
                     "original matrix: %s, adjusted_matrix: %s", self.stored_size, mask_size, zoom,
                     affine_matrix.shape, adjust_mat.shape)
        logger.trace("storage_size: %s, mask_size: %s, zoom: %s, "  # type: ignore
                     "original matrix: %s, adjusted_matrix: %s", self.stored_size, mask_size, zoom,
                     affine_matrix.shape, adjust_mat.shape)
          return adjust_mat
  
      def to_dict(self):
          """ Convert the mask to a dictionary for saving to an alignments file
  
keep keep keep keep replace replace replace keep keep keep keep keep
 lib.align updates:
  - alignments.py
    - Add typed dicts for imported alignments
    - Explicitly check for presence of thumb value in alignments dict
    - linting
  - detected_face.py
    - Typing
    - Linting
    - Legacy support for pre-aligned face
    - Update dependencies to new property names 
lib/align/detected_face.py