def bind_kernel(**kwargs):
from IPython.zmq.ipkernel import IPKernelApp<EOL>from IPython.parallel.apps.ipengineapp import IPEngineApp<EOL>if IPKernelApp.initialized() and isinstance(IPKernelApp._instance, IPKernelApp):<EOL><INDENT>return<EOL><DEDENT>if IPEngineApp.initialized():<EOL><INDENT>try:<EOL><INDENT>app = IPEngineApp.instance()<EOL><DEDENT>except MultipleInstanceError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>return app.bind_kernel(**kwargs)<EOL><DEDENT><DEDENT>raise RuntimeError("<STR_LIT>")<EOL>
Bind an Engine's Kernel to be used as a full IPython kernel.

    This allows a running Engine to be used simultaneously as a full IPython kernel
    with the QtConsole or other frontends.

    This function returns immediately.