def _confirm_close(self):
        if self._warn_close and (not os.environ.get('GLUE_TESTING')) and self.isVisible():
            buttons = QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel
            dialog = QtGui.QMessageBox.warning(self, "Confirm Close",
                                               "Do you want to close this window?",
                                               buttons=buttons,
                                               defaultButton=QtGui.QMessageBox.Cancel)
            return dialog == QtGui.QMessageBox.Ok
        return True
Writes the index-wide stats.
dataset/ETHPy150Open glue-viz/glue/glue/viewers/common/qt/data_viewer.py/DataViewer._confirm_close--crossover with--dataset/ETHPy150Open toastdriven/microsearch/microsearch.py/Microsearch.write_stats