def is_enabled(self, mode="normal"):
        """Check if command is enabled."""

        group = -1
        index = -1
        sheet = self.window.active_sheet()
        if sheet is not None:
            group, index = self.window.get_sheet_index(sheet)
        return group != -1 and index != -1 and mode in ["normal", "skip_unsaved", "dismiss_unsaved"]
dataset/ETHPy150Open facelessuser/TabsExtra/tabs_extra.py/TabsExtraCloseMenuCommand.is_enabled/original