          """ Group into bins by CNN face similarity """
          logger.info("Grouping by face-cnn similarity...")
  
          # Groups are of the form: group_num -> reference faces
          reference_groups = dict()
  
          # Bins array, where index is the group number and value is
          # an array containing the file paths to the images in that group.
          bins = []
  
 
</s> remove         reference_groups = dict()
 </s> add         reference_groups = {} </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:" </s> remove def update_legacy_png_header(filename, alignments):
 </s> add def update_legacy_png_header(filename: str, alignments: Alignments
                             ) -> Optional[PNGHeaderDict]: </s> remove                 "alignments file for your requested video.".format(len(pts_time), len(self.data)))
 </s> add                 "alignments file for your requested video.") </s> remove         self._faces_per_filename = dict()  # Tracking for recompiling face batches
 </s> add         self._faces_per_filename = {}  # Tracking for recompiling face batches
        reference_groups = {}
          """ Group into bins by CNN face similarity """
          logger.info("Grouping by face-cnn similarity...")
  
          # Groups are of the form: group_num -> reference faces
        reference_groups = {}
  
          # Bins array, where index is the group number and value is
          # an array containing the file paths to the images in that group.
          bins = []
  
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 
tools/sort/sort.py