      detected_face = DetectedFace()
      detected_face.from_alignment(alignment)
      # For dupe hash handling, make sure we get a different filename for repeat hashes
      src_fname, face_idx = list(alignments.hashes_to_frame[in_hash].items())[hashes_seen[in_hash]]
      orig_filename = "{}_{}.png".format(os.path.splitext(src_fname)[0], face_idx)
      meta = dict(alignments=detected_face.to_png_meta(),
                  source=dict(alignments_version=alignments.version,
                              original_filename=orig_filename,
                              face_index=face_idx,
                              source_filename=src_fname,
                              source_is_video=False))  # Can't check so set false
  
 
</s> remove         retval = dict()
 </s> add         retval = {} </s> remove             filename = "{}_{:06d}.png".format(vidname, frame_idx + 1)
 </s> add             filename = f"{vidname}_{frame_idx + 1:06d}.png" </s> remove                     self._hashes_to_frame.setdefault(face["hash"], dict())[frame_name] = idx
 </s> add                     self._hashes_to_frame.setdefault(face["hash"], {})[frame_name] = idx </s> remove             filename = "{}.{}".format(noext_name, self._serializer.file_extension)
 </s> add             filename = f"{noext_name}.{self._serializer.file_extension}" </s> remove             key = "{}_{:06d}.png".format(basename, idx + 1)
 </s> add             key = f"{basename}_{idx + 1:06d}.png"
    orig_filename = f"{os.path.splitext(src_fname)[0]}_{face_idx}.png"
    meta = PNGHeaderDict(alignments=detected_face.to_png_meta(),
                         source=PNGHeaderSourceDict(
                            alignments_version=alignments.version,
      detected_face = DetectedFace()
      detected_face.from_alignment(alignment)
      # For dupe hash handling, make sure we get a different filename for repeat hashes
      src_fname, face_idx = list(alignments.hashes_to_frame[in_hash].items())[hashes_seen[in_hash]]
    orig_filename = f"{os.path.splitext(src_fname)[0]}_{face_idx}.png"
    meta = PNGHeaderDict(alignments=detected_face.to_png_meta(),
                         source=PNGHeaderSourceDict(
                            alignments_version=alignments.version,
    orig_filename = f"{os.path.splitext(src_fname)[0]}_{face_idx}.png"
    meta = PNGHeaderDict(alignments=detected_face.to_png_meta(),
                         source=PNGHeaderSourceDict(
                            alignments_version=alignments.version,
    orig_filename = f"{os.path.splitext(src_fname)[0]}_{face_idx}.png"
    meta = PNGHeaderDict(alignments=detected_face.to_png_meta(),
                         source=PNGHeaderSourceDict(
                            alignments_version=alignments.version,
                              original_filename=orig_filename,
                              face_index=face_idx,
                              source_filename=src_fname,
                              source_is_video=False))  # Can't check so set false
  
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