  import cv2
  from tqdm import tqdm
  
  # faceswap imports
  from lib.serializer import get_serializer_from_filename
  from lib.align import AlignedFace, DetectedFace
  from lib.image import FacesLoader, read_image, read_image_meta_batch
  from lib.utils import FaceswapError
  from plugins.extract.recognition.vgg_face2_keras import VGGFace2 as VGGFace
  from plugins.extract.pipeline import Extractor, ExtractMedia
  
  logger = logging.getLogger(__name__)
  
  
  class Sort():  # pylint:disable=too-few-public-methods
 
</s> remove import numpy as np
import cv2
 </s> add  </s> remove from concurrent import futures
from shutil import copyfile
from typing import List
 </s> add from shutil import copyfile, rmtree
from typing import List, Optional, TYPE_CHECKING </s> remove import psutil
 </s> add import sys

from typing import Dict, Generator, List, Tuple, Optional
from lib.serializer import Serializer, get_serializer_from_filename
from lib.utils import deprecation_warning

from .sort_methods import SortBlur, SortColor, SortFace, SortHistogram, SortMultiMethod
from .sort_methods_aligned import SortDistance, SortFaceCNN, SortPitch, SortSize, SortYaw

if TYPE_CHECKING:
    from .sort_methods import SortMethod
  import cv2
  from tqdm import tqdm
  
  # faceswap imports
from lib.serializer import Serializer, get_serializer_from_filename
from lib.utils import deprecation_warning

from .sort_methods import SortBlur, SortColor, SortFace, SortHistogram, SortMultiMethod
from .sort_methods_aligned import SortDistance, SortFaceCNN, SortPitch, SortSize, SortYaw

if TYPE_CHECKING:
    from .sort_methods import SortMethod
from lib.serializer import Serializer, get_serializer_from_filename
from lib.utils import deprecation_warning

from .sort_methods import SortBlur, SortColor, SortFace, SortHistogram, SortMultiMethod
from .sort_methods_aligned import SortDistance, SortFaceCNN, SortPitch, SortSize, SortYaw

if TYPE_CHECKING:
    from .sort_methods import SortMethod
from lib.serializer import Serializer, get_serializer_from_filename
from lib.utils import deprecation_warning

from .sort_methods import SortBlur, SortColor, SortFace, SortHistogram, SortMultiMethod
from .sort_methods_aligned import SortDistance, SortFaceCNN, SortPitch, SortSize, SortYaw

if TYPE_CHECKING:
    from .sort_methods import SortMethod
from lib.serializer import Serializer, get_serializer_from_filename
from lib.utils import deprecation_warning

from .sort_methods import SortBlur, SortColor, SortFace, SortHistogram, SortMultiMethod
from .sort_methods_aligned import SortDistance, SortFaceCNN, SortPitch, SortSize, SortYaw

if TYPE_CHECKING:
    from .sort_methods import SortMethod
from lib.serializer import Serializer, get_serializer_from_filename
from lib.utils import deprecation_warning

from .sort_methods import SortBlur, SortColor, SortFace, SortHistogram, SortMultiMethod
from .sort_methods_aligned import SortDistance, SortFaceCNN, SortPitch, SortSize, SortYaw

if TYPE_CHECKING:
    from .sort_methods import SortMethod
from lib.serializer import Serializer, get_serializer_from_filename
from lib.utils import deprecation_warning

from .sort_methods import SortBlur, SortColor, SortFace, SortHistogram, SortMultiMethod
from .sort_methods_aligned import SortDistance, SortFaceCNN, SortPitch, SortSize, SortYaw

if TYPE_CHECKING:
    from .sort_methods import SortMethod
  
  logger = logging.getLogger(__name__)
  
  
  class Sort():  # pylint:disable=too-few-public-methods
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Overhaul sort:
  - Standardize image data reading and writing
  - Optimize loading (just one pass required)
  - Make all sort groups binnable (to greater or lesser results)
  - Add sort by pitch
  - Deprecate multiple options
  - linting, docs + locales 
tools/sort/sort.py