              if sorted_alignments == alignments:
                  logger.trace("Alignments already in correct order. Not sorting: '%s'", frame)
                  continue
              logger.trace("Sorting alignments for frame: '%s'", frame)
              self.alignments.data[key] = sorted_alignments
              reindexed += 1
          logger.info("%s Frames had their faces reindexed", reindexed)
          return reindexed
  
  
 
</s> remove     @property
    def mask_summary(self):
        """ Dict: The mask types and the number of faces which have each type that exist with in
        the loaded alignments """
        masks = dict()
        for faces in self.data.values():
            for face in faces:
                if face.get("mask", None) is None:
                    masks["none"] = masks.get("none", 0) + 1
                for key in face.get("mask", dict()):
                    masks[key] = masks.get(key, 0) + 1
        return masks

 </s> add  </s> remove         for alignments in self.data.values():
            for alignment in alignments:
 </s> add         for val in self._data.values():
            for alignment in val["faces"]: </s> remove         output_message += "\r\n".join([frame for frame in items_output])
 </s> add         output_message += "\r\n".join(items_output) </s> remove     def get_faces_in_frame(self, frame):
        """ Return the alignments for the selected frame """
        logger.trace("Getting faces for frame: '%s'", frame)
        return self.data.get(frame, list())

    def get_full_frame_name(self, frame):
        """ Return a frame with extension for when the extension is
            not known """
        retval = next(key for key in self.data.keys()
                      if key.startswith(frame))
        logger.trace("Requested: '%s', Returning: '%s'", frame, retval)
        return retval
 </s> add     def get_faces_in_frame(self, frame_name):
        """ Obtain the faces from :attr:`data` associated with a given frame_name. </s> remove         for alignments in self.data.values():
            for alignment in alignments:
 </s> add         for val in self._data.values():
            for alignment in val["faces"]:
            self.alignments.data[key]["faces"] = sorted_alignments
              if sorted_alignments == alignments:
                  logger.trace("Alignments already in correct order. Not sorting: '%s'", frame)
                  continue
              logger.trace("Sorting alignments for frame: '%s'", frame)
            self.alignments.data[key]["faces"] = sorted_alignments
              reindexed += 1
          logger.info("%s Frames had their faces reindexed", reindexed)
          return reindexed
  
  
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