def METHOD_NAME():
    from types import ModuleType
    module = ModuleType("test")
    def trigger_stop():
        time.sleep(1)
        app = IPKernelApp.instance()
        app.io_loop.add_callback(app.io_loop.stop)
        IPKernelApp.clear_instance()
    thread = threading.Thread(target=trigger_stop)
    thread.start()
    embed_kernel(module, outstream_class=None)