<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def undo(self):
 """ Restore to last version """

        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.")