              else:
                  logger.info("Old location: '%s', New location: '%s'", old_location, new_location)
                  load_serializer = get_serializer_from_filename(old_location)
                  data = load_serializer.load(old_location)
                  self.serializer.save(new_location, data)
          return os.path.basename(new_location)
  
      # <landmarks> #
      # Landmarks renamed from landmarksXY to landmarks_xy for PEP compliance
      def has_legacy_landmarksxy(self):
 
</s> remove     def has_legacy_landmarksxy(self):
        """ check for legacy landmarksXY keys """
 </s> add     def _has_legacy_landmarksxy(self):
        """ check for legacy landmarksXY keys.

        Returns
        -------
        bool
            ``True`` if the alignments file contains legacy `landmarksXY` keys otherwise ``False``
        """ </s> remove             filename = self.update_file_format(folder, filename)
 </s> add             filename = self._update_file_format(folder, filename) </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             filename = "{}.{}".format(noext_name, self.serializer.file_extension)
 </s> add             filename = "{}.{}".format(noext_name, self._serializer.file_extension) </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. """
                self._serializer.save(new_location, data)
              else:
                  logger.info("Old location: '%s', New location: '%s'", old_location, new_location)
                  load_serializer = get_serializer_from_filename(old_location)
                  data = load_serializer.load(old_location)
                self._serializer.save(new_location, data)
          return os.path.basename(new_location)
  
      # <landmarks> #
      # Landmarks renamed from landmarksXY to landmarks_xy for PEP compliance
      def has_legacy_landmarksxy(self):
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 
lib/alignments.py