          if updated:
              self.save()
  
      # <File Format> #
      # Serializer is now a compressed pickle .fsa format. This used to be any number of serializers
      def test_for_legacy(self, location):
          """ For alignments filenames passed in with out an extension, test for legacy formats """
          logger.debug("Checking for legacy alignments file formats: '%s'", location)
          filename = os.path.splitext(location)[0]
          for ext in (".json", ".p", ".pickle", ".yaml"):
              legacy_filename = "{}{}".format(filename, ext)
              if os.path.exists(legacy_filename):
 
</s> remove                 _ = self.update_file_format(*os.path.split(legacy_filename))
 </s> add                 _ = self._update_file_format(*os.path.split(legacy_filename)) </s> remove     def get_location(self, folder, filename):
        """ Return the path to alignments file """
 </s> add     def _get_location(self, folder, filename):
        """ Obtains the location of an alignments file.

        If a legacy alignments file is provided/discovered, then the alignments file will be
        updated to the custom ``.fsa`` format and saved.

        Parameters
        ----------
        folder: str
            The folder that the alignments file is located in
        filename: str
            The filename of the alignments file

        Returns
        -------
        str
            The full path to the alignments file
        """ </s> remove             self.update_legacy_landmarks_list()
 </s> add             self._update_legacy_landmarks_list() </s> remove         if extension[1:] == self.serializer.file_extension:
 </s> add         if extension[1:] == self._serializer.file_extension: </s> remove             # Test for old format alignments files and reformat if they exist
            # This will be executed if an alignments file has not been explicitly provided
            # therefore it will not have been picked up in the extension test
            self.test_for_legacy(location)
 </s> add             # Test for old format alignments files and reformat if they exist. This will be
            # executed if an alignments file has not been explicitly provided therefore it will not
            # have been picked up in the extension test
            self._test_for_legacy(location)
    # Serializer is now a compressed pickle custom format. This used to be any number
    # of serializers
    def _test_for_legacy(self, location):
        """ For alignments filenames passed in without an extension, test for legacy
        serialization formats and update to current ``.fsa`` format if any are found.

        Parameters
        ----------
        location: str
            The folder location to check for legacy alignments
        """
          if updated:
              self.save()
  
      # <File Format> #
    # Serializer is now a compressed pickle custom format. This used to be any number
    # of serializers
    def _test_for_legacy(self, location):
        """ For alignments filenames passed in without an extension, test for legacy
        serialization formats and update to current ``.fsa`` format if any are found.

        Parameters
        ----------
        location: str
            The folder location to check for legacy alignments
        """
    # Serializer is now a compressed pickle custom format. This used to be any number
    # of serializers
    def _test_for_legacy(self, location):
        """ For alignments filenames passed in without an extension, test for legacy
        serialization formats and update to current ``.fsa`` format if any are found.

        Parameters
        ----------
        location: str
            The folder location to check for legacy alignments
        """
    # Serializer is now a compressed pickle custom format. This used to be any number
    # of serializers
    def _test_for_legacy(self, location):
        """ For alignments filenames passed in without an extension, test for legacy
        serialization formats and update to current ``.fsa`` format if any are found.

        Parameters
        ----------
        location: str
            The folder location to check for legacy alignments
        """
          logger.debug("Checking for legacy alignments file formats: '%s'", location)
          filename = os.path.splitext(location)[0]
          for ext in (".json", ".p", ".pickle", ".yaml"):
              legacy_filename = "{}{}".format(filename, ext)
              if os.path.exists(legacy_filename):
keep keep keep keep replace 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