                           "in the alignments file. Please check your data, and if neccesarry run "
                           "the `remove-faces` job. To get a list of faces missing alignments "
                           "entries, run with VERBOSE logging")
              logger.verbose("Files in faces folder not in alignments file: %s", errors)
              exit(1)
          return self._sort_mappings(source_filenames, dest_filenames)
  
      @staticmethod
      def _validate_hash_match(disk_faces, align_faces):
          """ Validate that the hash has returned corresponding faces from disk and alignments file.
 
</s> remove             filter_out=True: Remove faces that match in the hash list
            filter_out=False: Remove faces that are not in the hash list
 </s> add         Parameters
        ----------
        hash_list: list
            List of SHA1 hashes in `str` format to use as a filter against :attr:`data`
        filter_out: bool, optional
            ``True`` if faces should be removed from :attr:`data` when there is a corresponding
            match in the given hash_list. ``False`` if faces should be kept in :attr:`data` when
            there is a corresponding match in the given hash_list, but removed if there is no
            match. Default: ``False`` </s> remove     """ Holds processes pertaining to the alignments file.

        folder:     folder alignments file is stored in
        filename:   Filename of alignments file. If a
                    valid extension is provided, then it will be used to
                    decide the serializer otherwise compressed pickle is used.
 </s> add     """ The alignments file is a custom serialized ``.fsa`` file that holds information for each
    frame for a video or series of images.

    Specifically, it holds a list of faces that appear in each frame. Each face contains
    information detailing their detected bounding box location within the frame, the 68 point
    facial landmarks and any masks that have been extracted.

    Additionally it can also hold video meta information (timestamp and whether a frame is a
    key frame.)

    Parameters
    ----------
    folder: str
        The folder that contains the alignments ``.fsa`` file
    filename: str, optional
        The filename of the ``.fsa`` alignments file. If not provided then the given folder will be
        checked for a default alignments file filename. Default: "alignments" </s> remove     def filter_hashes(self, hashlist, filter_out=False):
        """ Filter in or out faces that match the hash list
 </s> add     def filter_hashes(self, hash_list, filter_out=False):
        """ Remove faces from :attr:`data` based on a given hash list. </s> remove     def frame_has_faces(self, frame):
        """ Return true if frame exists and has faces """
        retval = bool(self.data.get(frame, list()))
        logger.trace("'%s': %s", frame, retval)
 </s> add     def frame_has_faces(self, frame_name):
        """ Check whether a given frame_name exists within the alignments :attr:`data` and contains
        at least 1 face.

        Parameters
        ----------
        frame_name: str
            The frame name to check. This should be the base name of the frame, not the full path

        Returns
        -------
        bool
            ``True`` if the given frame_name exists within the alignments :attr:`data` and has at
            least 1 face associated with it, otherwise ``False``
        """
        retval = bool(self._data.get(frame_name, dict()).get("faces", []))
        logger.trace("'%s': %s", frame_name, retval) </s> remove     def get_location(self, folder, filename):
        """ Return the path to alignments file """
 </s> add     def _get_location(self, folder, filename):
        """ Obtains the location of an alignments file.

        If a legacy alignments file is provided/discovered, then the alignments file will be
        updated to the custom ``.fsa`` format and saved.

        Parameters
        ----------
        folder: str
            The folder that the alignments file is located in
        filename: str
            The filename of the alignments file

        Returns
        -------
        str
            The full path to the alignments file
        """
            sys.exit(1)
                           "in the alignments file. Please check your data, and if neccesarry run "
                           "the `remove-faces` job. To get a list of faces missing alignments "
                           "entries, run with VERBOSE logging")
              logger.verbose("Files in faces folder not in alignments file: %s", errors)
            sys.exit(1)
          return self._sort_mappings(source_filenames, dest_filenames)
  
      @staticmethod
      def _validate_hash_match(disk_faces, align_faces):
          """ Validate that the hash has returned corresponding faces from disk and alignments file.
keep keep keep keep replace keep keep keep keep keep
 lib.alignments - Slight update (#978)

* lib.alignments update:
  - Minor structure change (faces to nested dictionary)
  - Refactor internal and external methods
  - Documentation 
tools/lib_alignments/jobs.py