code: def leave_safe_mode(self):
          
  
          self.code_array.safe_mode = False
  
          # Clear result cache
          self.code_array.result_cache.clear()
  
          # Execute macros
          self.main_window.actions.execute_macros()
  
          post_command_event(self.main_window, self.SafeModeExitMsg)
docs: Leaves safe mode