code: def is_event_loop_running_wx(app=None):
      """Is the wx event loop running."""
      # New way: check attribute on shell instance
      ip = get_ipython()
      if ip is not None:
          if ip.active_eventloop and ip.active_eventloop == "wx":
              return True
          # Fall through to checking the application, because Wx has a native way
          # to check if the event loop is running, unlike Qt.
  
      # Old way: check Wx application
      if app is None:
          app = get_app_wx()
      if hasattr(app, "_in_event_loop"):
          return app._in_event_loop
      else:
          return app.IsMainLoopRunning()
  
imports: from IPython.core.getipython import get_ipython
label_desc: Use image node_id 2 for calling a global function with example usage: is_event_loop_running_wx(app) and returns: app, app, True