def METHOD_NAME(context):
    """Run the wx event loop until the user provides more input.
    This input hook is suitable for use with wxPython >= 4 (a.k.a. Phoenix).
    It uses the same approach to that used in
    ipykernel.eventloops.loop_wx. The wx.MainLoop is executed, and a wx.Timer
    is used to periodically poll the context for input. As soon as input is
    ready, the wx.MainLoop is stopped.
    """
    app = wx.GetApp()
    if app is None:
        return
    if context.input_is_ready():
        return
    assert wx.IsMainThread()
    # Wx uses milliseconds
    poll_interval = 100
    # Use a wx.Timer to periodically check whether input is ready - as soon as
    # it is, we exit the main loop
    timer = wx.Timer()
    def poll(ev):
        if context.input_is_ready():
            timer.Stop()
            app.ExitMainLoop()
    timer.Start(poll_interval)
    timer.Bind(wx.EVT_TIMER, poll)
    # The import of wx on Linux sets the handler for signal.SIGINT to 0.  This
    # is a bug in wx or gtk.  We fix by just setting it back to the Python
    # default.
    if not callable(signal.getsignal(signal.SIGINT)):
        signal.signal(signal.SIGINT, signal.default_int_handler)
    # The SetExitOnFrameDelete call allows us to run the wx mainloop without
    # having a frame open.
    app.SetExitOnFrameDelete(False)
    app.MainLoop()