          logger.trace("BlurMask kwargs: %s", retval)
          return retval
  
  
  _HASHES_SEEN = dict()
  
  
  def update_legacy_png_header(filename, alignments):
      """ Update a legacy extracted face from pre v2.1 alignments by placing the alignment data for
      the face in the png exif header for the given filename with the given alignment data.
 
</s> remove def update_legacy_png_header(filename, alignments):
 </s> add def update_legacy_png_header(filename: str, alignments: Alignments
                             ) -> Optional[PNGHeaderDict]: </s> remove         logger.trace("BlurMask kwargs: %s", retval)
 </s> add         logger.trace("BlurMask kwargs: %s", retval)  # type: ignore </s> remove         retval = bool(self._data.get(frame_name, dict()).get("faces", []))
 </s> add         retval = bool(self._data.get(frame_name, {}).get("faces", [])) </s> remove     def _get_kwargs(self):
 </s> add     def _get_kwargs(self) -> Dict[str, Union[int, Tuple[int, int]]]: </s> remove         alignment = dict(x=self.x,
                         w=self.w,
                         y=self.y,
                         h=self.h,
                         landmarks_xy=self.landmarks_xy.tolist(),
                         mask={name: mask.to_png_meta() for name, mask in self.mask.items()})
 </s> add         if (self.left is None or self.width is None or self.top is None or self.height is None):
            raise AssertionError("Some detected face variables have not been initialized")
        alignment = PNGHeaderAlignmentsDict(
            x=self.left,
            w=self.width,
            y=self.top,
            h=self.height,
            landmarks_xy=self.landmarks_xy.tolist(),
            mask={name: mask.to_png_meta() for name, mask in self.mask.items()})
_HASHES_SEEN: Dict[str, Dict[str, int]] = {}
          logger.trace("BlurMask kwargs: %s", retval)
          return retval
  
  
_HASHES_SEEN: Dict[str, Dict[str, int]] = {}
  
  
  def update_legacy_png_header(filename, alignments):
      """ Update a legacy extracted face from pre v2.1 alignments by placing the alignment data for
      the face in the png exif header for the given filename with the given alignment data.
keep keep keep keep 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