code: def finalize(self):
          
          self.pause_session_logging()
          self._disable_logging()
          self._msg_callback = None
          self._error_msg_callback = None
          self._warning_msg_callback = None
          self._info_msg_callback = None
docs: Clean up the object.
  
          After calling this method the object can't be used anymore.
          This will be reworked when changing the logging model.