  import logging
  import os
  import sys
  from datetime import datetime
  
  import numpy as np
  
  from lib.serializer import get_serializer, get_serializer_from_filename
  from lib.utils import FaceswapError
 
</s> remove from typing import Dict, List, TYPE_CHECKING

 </s> add from typing import Callable, Dict, List, Optional, Tuple, TYPE_CHECKING, Union </s> remove from tensorflow.python.framework import errors_impl as tf_errors
 </s> add from tensorflow.python.framework import errors_impl as tf_errors  # pylint:disable=no-name-in-module # noqa </s> remove from tensorflow.python.framework import errors_impl as tf_errors
 </s> add from tensorflow.python.framework import errors_impl as tf_errors  # pylint:disable=no-name-in-module # noqa
from typing import Dict, List, Optional, TYPE_CHECKING, Union
  import logging
  import os
  import sys
  from datetime import datetime
from typing import Dict, List, Optional, TYPE_CHECKING, Union
  
  import numpy as np
  
  from lib.serializer import get_serializer, get_serializer_from_filename
  from lib.utils import FaceswapError
keep keep keep add 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