          """
          logger.debug("Checking for legacy alignments file formats: '%s'", location)
          filename = os.path.splitext(location)[0]
          for ext in (".json", ".p", ".pickle", ".yaml"):
              legacy_filename = "{}{}".format(filename, ext)
              if os.path.exists(legacy_filename):
                  logger.debug("Legacy alignments file exists: '%s'", legacy_filename)
                  _ = self._update_file_format(*os.path.split(legacy_filename))
                  break
              logger.debug("Legacy alignments file does not exist: '%s'", legacy_filename)
 
</s> remove             raise FaceswapError("Error: Alignments file not found at "
                                "{}".format(self._file))
 </s> add             raise FaceswapError(f"Error: Alignments file not found at {self._file}") </s> remove             filename = "{}.{}".format(noext_name, self._serializer.file_extension)
 </s> add             filename = f"{noext_name}.{self._serializer.file_extension}" </s> remove         new_location = "{}.{}".format(os.path.splitext(old_location)[0],
                                      self._serializer.file_extension)
 </s> add         new_location = f"{os.path.splitext(old_location)[0]}.{self._serializer.file_extension}" </s> remove def update_legacy_png_header(filename, alignments):
 </s> add def update_legacy_png_header(filename: str, alignments: Alignments
                             ) -> Optional[PNGHeaderDict]: </s> remove         retval = all("thumb" in face
 </s> add         retval = all(face.get("thumb")
            legacy_filename = f"{filename}{ext}"
          """
          logger.debug("Checking for legacy alignments file formats: '%s'", location)
          filename = os.path.splitext(location)[0]
          for ext in (".json", ".p", ".pickle", ".yaml"):
            legacy_filename = f"{filename}{ext}"
              if os.path.exists(legacy_filename):
                  logger.debug("Legacy alignments file exists: '%s'", legacy_filename)
                  _ = self._update_file_format(*os.path.split(legacy_filename))
                  break
              logger.debug("Legacy alignments file does not exist: '%s'", legacy_filename)
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/alignments.py