                        for key in alignment))
          logger.debug("legacy landmarksXY: %s", retval)
          return retval
  
      def update_legacy_landmarksxy(self):
          """ Update landmarksXY to landmarks_xy and save alignments """
          update_count = 0
          for alignments in self.data.values():
              for alignment in alignments:
                  alignment["landmarks_xy"] = alignment.pop("landmarksXY")
                  update_count += 1
 
</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         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     def update_legacy_landmarks_list(self):
        """ Update landmarksXY to landmarks_xy and save alignments """
 </s> add     def _update_legacy_landmarks_list(self):
        """ Update landmarks stored as `list` to :class:`numpy.ndarray`. """ </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                          for faces in self.data.values()
                         for face in faces)
 </s> add                          for val in self._data.values()
                         for face in val["faces"])
    def _update_legacy_landmarksxy(self):
        """ Update legacy `landmarksXY` keys to PEP compliant `landmarks_xy` keys. """
                        for key in alignment))
          logger.debug("legacy landmarksXY: %s", retval)
          return retval
  
    def _update_legacy_landmarksxy(self):
        """ Update legacy `landmarksXY` keys to PEP compliant `landmarks_xy` keys. """
    def _update_legacy_landmarksxy(self):
        """ Update legacy `landmarksXY` keys to PEP compliant `landmarks_xy` keys. """
          update_count = 0
          for alignments in self.data.values():
              for alignment in alignments:
                  alignment["landmarks_xy"] = alignment.pop("landmarksXY")
                  update_count += 1
keep keep keep keep replace 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 
lib/alignments.py