code: def loop_asyncio_exit(kernel):
      """Exit hook for asyncio"""
      import asyncio
  
      loop = asyncio.get_event_loop()
      if loop.is_running():
          loop.call_soon(loop.stop)
  
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 21 for calling a global function with example usage: loop_asyncio_exit(kernel) without return types