def _atexit_once(self):
    '\n        At exist operation that need to be called at most once.\n        Second call to this function per instance will do nothing.\n        '
    if (not getattr(self, '_atexit_once_called', False)):
        self._atexit_once_called = True
        self.reset(new_session=False)
        self.history_manager.end_session()
        self.history_manager = None
At exist operation that need to be called at most once.
Second call to this function per instance will do nothing.
def _atexit_once(self):
    '\n        At exist operation that need to be called at most once.\n        Second call to this function per instance will do nothing.\n        '
    if (not getattr(self, '_atexit_once_called', False)):
        self._atexit_once_called = True
        self.reset(new_session=False)
        self.history_manager.end_session()
        self.history_manager = None