def can_undo_redo(self):
        return len(self._command_stack) > 0, len(self._undo_stack) > 0
Return whether undo and redo options are possible
dataset/ETHPy150Open glue-viz/glue/glue/core/command.py/CommandStack.can_undo_redo