def METHOD_NAME(
    inputhook: Callable[[InputHookContext], None]
) -> AbstractEventLoop:
    """
    Create a new event loop with the given inputhook, and activate it.
    """
    loop = new_eventloop_with_inputhook(inputhook)
    asyncio.set_event_loop(loop)
    return loop