def save_mets(self):
        """
        Write out the current state of the METS file.
        """
        log.info("Saving mets '%s'" % self.mets_target)
        if self.automatic_backup:
            WorkspaceBackupManager(self).add()
        with open(self.mets_target, 'wb') as f:
            f.write(self.mets.to_xml(xmllint=True))
Write out the current state of the METS file.