code: def loop_asyncio(kernel):
      """Start a kernel with asyncio event loop support."""
      import asyncio
  
      loop = asyncio.get_event_loop()
      # loop is already running (e.g. tornado 5), nothing left to do
      if loop.is_running():
          return
  
      def kernel_handler():
          loop.call_soon(kernel.do_one_iteration)
          loop.call_later(kernel._poll_interval, kernel_handler)
  
      loop.call_soon(kernel_handler)
      while True:
          error = None
          try:
              loop.run_forever()
          except KeyboardInterrupt:
              continue
          except Exception as e:
              error = e
          if hasattr(loop, "shutdown_asyncgens"):
              loop.run_until_complete(loop.shutdown_asyncgens())
          loop.close()
          if error is not None:
              raise error
          break
  
imports: import os
  import sys
  import platform
  import zmq
  from distutils.version import LooseVersion
  from traitlets.config.application import Application
  from IPython.utils import io
label_desc: Use image node_id 20 for calling a global function with example usage: loop_asyncio(kernel) without return types