Performs the top group on the redo stack, if present. Creates an undo
        group with the same name. Raises RuntimeError if called while undoing.

def redo(self):
        """
        Performs the top group on the redo stack, if present. Creates an undo
        group with the same name. Raises RuntimeError if called while undoing.
        """
        if self._undoing or self._redoing:
            raise RuntimeError
        if not self._redo:
            return
        group = self._redo.pop()

        self._redoing = True

        self.begin_grouping()
        group.perform()
        self.set_action_name(group.name)
        self.end_grouping()

        self._redoing = False

        self.notify()