                      self._hashes_to_frame.setdefault(face["hash"], dict())[frame_name] = idx
          return self._hashes_to_frame
  
      # << INIT FUNCTIONS >> #
  
      def _get_location(self, folder, filename):
          """ Obtains the location of an alignments file.
 
</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             for frame_name, faces in self.data.items():
                for idx, face in enumerate(faces):
 </s> add             for frame_name, val in self._data.items():
                for idx, face in enumerate(val["faces"]): </s> remove     def update_legacy(self):
        """ Update legacy alignments """
 </s> add     def _update_legacy(self):
        """ Check whether the alignments are legacy, and if so update them to current alignments
        format. """ </s> remove             yield frame_name, alignments, face_count, frame_fullname

    @staticmethod
    def yield_original_index_reverse(image_alignments, number_alignments):
        """ Return the correct original index for
            alignment in reverse order """
        for idx, _ in enumerate(reversed(image_alignments)):
            original_idx = number_alignments - 1 - idx
            logger.trace("Yielding: face index %s", original_idx)
            yield original_idx
 </s> add             yield frame_name, val["faces"], face_count, frame_fullname </s> remove         self.serializer = get_serializer("compressed")
        self.file = self.get_location(folder, filename)

        self.data = self.load()
        self.update_legacy()
 </s> add         self._serializer = get_serializer("compressed")
        self._file = self._get_location(folder, filename)
        self._data = self._load()
        self._update_legacy()
    @property
    def mask_summary(self):
        """ dict: The mask type names stored in the alignments :attr:`data` as key with the number
        of faces which possess the mask type as value. """
        masks = dict()
        for val in self._data.values():
            for face in val["faces"]:
                if face.get("mask", None) is None:
                    masks["none"] = masks.get("none", 0) + 1
                for key in face.get("mask", dict()):
                    masks[key] = masks.get(key, 0) + 1
        return masks

                      self._hashes_to_frame.setdefault(face["hash"], dict())[frame_name] = idx
          return self._hashes_to_frame
  
    @property
    def mask_summary(self):
        """ dict: The mask type names stored in the alignments :attr:`data` as key with the number
        of faces which possess the mask type as value. """
        masks = dict()
        for val in self._data.values():
            for face in val["faces"]:
                if face.get("mask", None) is None:
                    masks["none"] = masks.get("none", 0) + 1
                for key in face.get("mask", dict()):
                    masks[key] = masks.get(key, 0) + 1
        return masks

      # << INIT FUNCTIONS >> #
  
      def _get_location(self, folder, filename):
          """ Obtains the location of an alignments file.
keep keep add 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