  
      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
          logger.debug("Updated landmarks_xy: %s", update_count)
  
      # Landmarks stored as list instead of numpy array
 
</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_landmarksxy(self):
        """ Update landmarksXY to landmarks_xy and save alignments """
 </s> add     def _update_legacy_landmarksxy(self):
        """ Update legacy `landmarksXY` keys to PEP compliant `landmarks_xy` keys. """ </s> remove     def has_legacy_landmarks_list(self):
        """ check for legacy landmarks stored as list """
 </s> add     def _has_legacy_landmarks_list(self):
        """ check for legacy landmarks stored as `list` rather than :class:`numpy.ndarray`.

        Returns
        -------
        bool
            ``True`` if not all landmarks are :class:`numpy.ndarray` otherwise ``False``
        """ </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 faces in self.data.values()
                         for face in faces)
 </s> add                          for val in self._data.values()
                         for face in val["faces"])
        for val in self._data.values():
            for alignment in val["faces"]:
  
      def update_legacy_landmarksxy(self):
          """ Update landmarksXY to landmarks_xy and save alignments """
          update_count = 0
        for val in self._data.values():
            for alignment in val["faces"]:
        for val in self._data.values():
            for alignment in val["faces"]:
                  alignment["landmarks_xy"] = alignment.pop("landmarksXY")
                  update_count += 1
          logger.debug("Updated landmarks_xy: %s", update_count)
  
      # Landmarks stored as list instead of numpy array
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