def _reset_session(self, show=True):

        if not os.environ.get('GLUE_TESTING'):
            buttons = QMessageBox.Ok | QMessageBox.Cancel
            dialog = QMessageBox.warning(self, "Confirm Close",
                                         "Are you sure you want to reset the session? "
                                         "This will close all datasets, subsets, and data viewers",
                                         buttons=buttons,
                                         defaultButton=QMessageBox.Cancel)
            if not dialog == QMessageBox.Ok:
                return

        ga = GlueApplication()
        ga.show()
        self.close()

        return ga
Reset session to clean state.
dataset/ETHPy150Open glue-viz/glue/glue/app/qt/application.py/GlueApplication._reset_session