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
  
      if loop.is_closed():
          # main loop is closed, create a new one
          loop = asyncio.new_event_loop()
          asyncio.set_event_loop(loop)
      loop._should_close = False  # type:ignore[attr-defined]
  
      # pause eventloop when there's an event on a zmq socket
      def process_stream_events(stream):
          """fall back to main loop when there's a socket event"""
          if stream.flush(limit=1):
              loop.stop()
  
      notifier = partial(process_stream_events, kernel.shell_stream)
      loop.add_reader(kernel.shell_stream.getsockopt(zmq.FD), notifier)
      loop.call_soon(notifier)
  
      while True:
          error = None
          try:
              loop.run_forever()
          except KeyboardInterrupt:
              continue
          except Exception as e:
              error = e
          if loop._should_close:  # type:ignore[attr-defined]
              loop.close()
          if error is not None:
              raise error
          break
  
imports: import os
  import platform
  import sys
  from functools import partial
  import zmq
  from packaging.version import Version
  from traitlets.config.application import Application
label_desc: Use image node_id 17 for calling a global function with example usage: loop_asyncio(kernel) without return types