code: def get_app_wx(*args, **kwargs):
      """Create a new wx app or return an exiting one."""
      import wx
  
      app = wx.GetApp()
      if app is None:
          if "redirect" not in kwargs:
              kwargs["redirect"] = False
          app = wx.PySimpleApp(*args, **kwargs)
      return app
  
imports: from IPython.core.getipython import get_ipython
label_desc: Use image node_id 1 for calling a global function with example usage: get_app_wx() and returns: app