              The loaded alignments data
          """
          logger.debug("Loading alignments")
          if not self.have_alignments_file:
              raise FaceswapError("Error: Alignments file not found at "
                                  "{}".format(self._file))
  
          logger.info("Reading alignments from: '%s'", self._file)
          data = self._serializer.load(self._file)
          self._meta = data.get("__meta__", dict(version=1.0))
          self._version = self._meta["version"]
 
</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             legacy_filename = "{}{}".format(filename, ext)
 </s> add             legacy_filename = f"{filename}{ext}" </s> remove def update_legacy_png_header(filename, alignments):
 </s> add def update_legacy_png_header(filename: str, alignments: Alignments
                             ) -> Optional[PNGHeaderDict]: </s> remove                 "There is a mismatch between the number of frames found in the video file ({}) "
                "and the number of frames found in the alignments file ({})."
                "\nThis can be caused by a number of issues:"
 </s> add                 "There is a mismatch between the number of frames found in the video file "
                f"({len(pts_time)}) and the number of frames found in the alignments file "
                f"({len(self.data)}).\nThis can be caused by a number of issues:"
            raise FaceswapError(f"Error: Alignments file not found at {self._file}")
              The loaded alignments data
          """
          logger.debug("Loading alignments")
          if not self.have_alignments_file:
            raise FaceswapError(f"Error: Alignments file not found at {self._file}")
            raise FaceswapError(f"Error: Alignments file not found at {self._file}")
  
          logger.info("Reading alignments from: '%s'", self._file)
          data = self._serializer.load(self._file)
          self._meta = data.get("__meta__", dict(version=1.0))
          self._version = self._meta["version"]
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/alignments.py