              logger.debug("Updated legacy alignments. New filename: '%s'", filename)
          if extension[1:] == self._serializer.file_extension:
              logger.debug("Valid Alignments filename provided: '%s'", filename)
          else:
              filename = "{}.{}".format(noext_name, self._serializer.file_extension)
              logger.debug("File extension set from serializer: '%s'",
                           self._serializer.file_extension)
          location = os.path.join(str(folder), filename)
          if not os.path.exists(location):
              # Test for old format alignments files and reformat if they exist. This will be
 
</s> remove                 filename = "{}_{}".format(vid, filename)
 </s> add                 filename = f"{vid}_{filename}" </s> remove             legacy_filename = "{}{}".format(filename, ext)
 </s> add             legacy_filename = f"{filename}{ext}" </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             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                      image.shape if image is not None and image.any() else image,
                     x, w, y, h, landmarks_xy,
                     {k: v.shape for k, v in mask} if mask is not None else mask,
                     filename)
 </s> add                      image.shape if image is not None and image.any() else image, left, width, top,
                     height, landmarks_xy, mask, filename)
            filename = f"{noext_name}.{self._serializer.file_extension}"
              logger.debug("Updated legacy alignments. New filename: '%s'", filename)
          if extension[1:] == self._serializer.file_extension:
              logger.debug("Valid Alignments filename provided: '%s'", filename)
          else:
            filename = f"{noext_name}.{self._serializer.file_extension}"
              logger.debug("File extension set from serializer: '%s'",
                           self._serializer.file_extension)
          location = os.path.join(str(folder), filename)
          if not os.path.exists(location):
              # Test for old format alignments files and reformat if they exist. This will be
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