code: def save_mets(self):
          
          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))
docs: Write out the current state of the METS file.