          self.mask = dict()
          for name, mask_dict in alignment["mask"].items():
              self.mask[name] = Mask()
              self.mask[name].from_dict(mask_dict)
          logger.trace("Created from png exif header: (x: %s, w: %s, y: %s. h: %s, landmarks: %s, "
                       "mask: %s)", self.x, self.w, self.y, self.h, self.landmarks_xy, self.mask)
  
      def _image_to_face(self, image):
          """ set self.image to be the cropped face from detected bounding box """
          logger.trace("Cropping face from image")
          self.image = image[self.top: self.bottom,
 
</s> remove     def _image_to_face(self, image):
 </s> add     def _image_to_face(self, image: np.ndarray) -> None: </s> remove         logger.trace("Cropping face from image")
 </s> add         logger.trace("Cropping face from image")  # type: ignore </s> remove         self.x = alignment["x"]
        self.w = alignment["w"]
        self.y = alignment["y"]
        self.h = alignment["h"]
        self.landmarks_xy = np.array(alignment["landmarks_xy"], dtype="float32")
        self.mask = dict()
 </s> add         self.left = alignment["x"]
        self.width = alignment["w"]
        self.top = alignment["y"]
        self.height = alignment["h"]
        self._landmarks_xy = np.array(alignment["landmarks_xy"], dtype="float32")
        self.mask = {} </s> remove         logger.trace("Created from alignment: (x: %s, w: %s, y: %s. h: %s, "
                     "landmarks: %s, mask: %s)",
                     self.x, self.w, self.y, self.h, self.landmarks_xy, self.mask)
 </s> add         logger.trace("Created from alignment: (left: %s, width: %s, top: %s, "  # type: ignore
                     "height: %s, landmarks: %s, mask: %s)", self.left, self.width, self.top,
                     self.height, self.landmarks_xy, self.mask) </s> remove     def to_png_meta(self):
 </s> add     def to_png_meta(self) -> PNGHeaderAlignmentsDict:
        logger.trace("Created from png exif header: (left: %s, width: %s, top: %s "  # type: ignore
                     " height: %s, andmarks: %s, mask: %s)", self.left, self.width, self.top,
                     self.height, self.landmarks_xy, self.mask)
          self.mask = dict()
          for name, mask_dict in alignment["mask"].items():
              self.mask[name] = Mask()
              self.mask[name].from_dict(mask_dict)
        logger.trace("Created from png exif header: (left: %s, width: %s, top: %s "  # type: ignore
                     " height: %s, andmarks: %s, mask: %s)", self.left, self.width, self.top,
                     self.height, self.landmarks_xy, self.mask)
        logger.trace("Created from png exif header: (left: %s, width: %s, top: %s "  # type: ignore
                     " height: %s, andmarks: %s, mask: %s)", self.left, self.width, self.top,
                     self.height, self.landmarks_xy, self.mask)
  
      def _image_to_face(self, image):
          """ set self.image to be the cropped face from detected bounding box """
          logger.trace("Cropping face from image")
          self.image = image[self.top: self.bottom,
keep keep keep keep 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