          """ Merge the source alignment into the destination """
          logger.debug("Merging alignment: (frame: %s, src_idx: %s, hash: %s)",
                       frame, idx, alignment["hash"])
          self._hashes_to_frame.setdefault(alignment["hash"], dict())[frame] = idx
          self.final_alignments.data.setdefault(frame, list()).append(alignment)
  
      def set_destination_filename(self):
          """ Set the destination filename """
          folder = os.path.split(self.final_alignments.file)[0]
          ext = os.path.splitext(self.final_alignments.file)[1]
 
</s> remove             yield frame_name, alignments, face_count, frame_fullname

    @staticmethod
    def yield_original_index_reverse(image_alignments, number_alignments):
        """ Return the correct original index for
            alignment in reverse order """
        for idx, _ in enumerate(reversed(image_alignments)):
            original_idx = number_alignments - 1 - idx
            logger.trace("Yielding: face index %s", original_idx)
            yield original_idx
 </s> add             yield frame_name, val["faces"], face_count, frame_fullname </s> remove     def delete_face_at_index(self, frame, idx):
        """ Delete the face alignment for given frame at given index """
        logger.debug("Deleting face %s for frame '%s'", idx, frame)
        idx = int(idx)
        if idx + 1 > self.count_faces_in_frame(frame):
            logger.debug("No face to delete: (frame: '%s', idx %s)", frame, idx)
 </s> add     def delete_face_at_index(self, frame_name, face_index):
        """ Delete the face for the given frame_name at the given face index from :attr:`data`.

        Parameters
        ----------
        frame_name: str
            The frame name to remove the face from. This should be the base name of the frame, not
            the full path
        face_index: int
            The index number of the face within the given frame_name to remove

        Returns
        -------
        bool
            ``True`` if a face was successfully deleted otherwise ``False``
        """
        logger.debug("Deleting face %s for frame_name '%s'", face_index, frame_name)
        face_index = int(face_index)
        if face_index + 1 > self._count_faces_in_frame(frame_name):
            logger.debug("No face to delete: (frame_name: '%s', face_index %s)",
                         frame_name, face_index) </s> remove             exit(0)
 </s> add             sys.exit(1) </s> remove             exit(0)
 </s> add             sys.exit(1)
        self.final_alignments.data.setdefault(frame,
                                              dict()).setdefault("faces", []).append(alignment)
          """ Merge the source alignment into the destination """
          logger.debug("Merging alignment: (frame: %s, src_idx: %s, hash: %s)",
                       frame, idx, alignment["hash"])
          self._hashes_to_frame.setdefault(alignment["hash"], dict())[frame] = idx
        self.final_alignments.data.setdefault(frame,
                                              dict()).setdefault("faces", []).append(alignment)
  
      def set_destination_filename(self):
          """ Set the destination filename """
          folder = os.path.split(self.final_alignments.file)[0]
          ext = os.path.splitext(self.final_alignments.file)[1]
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