code: def undo(self):
          
          log = getLogger('ocrd.workspace_backup.undo')
          backups = self.list()
          if backups:
              last_backup = backups[0]
              self.restore(last_backup.chksum, choose_first=True)
          else:
              log.info("No backups, nothing to undo.")
docs: Restore to last version