          return os.path.basename(new_location)
  
      # <landmarks> #
      # Landmarks renamed from landmarksXY to landmarks_xy for PEP compliance
      def has_legacy_landmarksxy(self):
          """ check for legacy landmarksXY keys """
          logger.debug("checking legacy landmarksXY")
          retval = (any(key == "landmarksXY"
                        for alignments in self.data.values()
                        for alignment in alignments
                        for key in alignment))
 
</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                 self.serializer.save(new_location, data)
 </s> add                 self._serializer.save(new_location, data) </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                          for faces in self.data.values()
                         for face in faces)
 </s> add                          for val in self._data.values()
                         for face 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"]:
    def _has_legacy_landmarksxy(self):
        """ check for legacy landmarksXY keys.

        Returns
        -------
        bool
            ``True`` if the alignments file contains legacy `landmarksXY` keys otherwise ``False``
        """
          return os.path.basename(new_location)
  
      # <landmarks> #
      # Landmarks renamed from landmarksXY to landmarks_xy for PEP compliance
    def _has_legacy_landmarksxy(self):
        """ check for legacy landmarksXY keys.

        Returns
        -------
        bool
            ``True`` if the alignments file contains legacy `landmarksXY` keys otherwise ``False``
        """
    def _has_legacy_landmarksxy(self):
        """ check for legacy landmarksXY keys.

        Returns
        -------
        bool
            ``True`` if the alignments file contains legacy `landmarksXY` keys otherwise ``False``
        """
          logger.debug("checking legacy landmarksXY")
          retval = (any(key == "landmarksXY"
                        for alignments in self.data.values()
                        for alignment in alignments
                        for key in alignment))
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