code: def _qt_app_exec(app):
      # adapted from matplotlib
      old_signal = signal.getsignal(signal.SIGINT)
      is_python_signal_handler = old_signal is not None
      if is_python_signal_handler:
          signal.signal(signal.SIGINT, signal.SIG_DFL)
      try:
          # Make IPython Console accessible again in Spyder
          app.lastWindowClosed.connect(app.quit)
          app.exec_()
      finally:
          # reset the SIGINT exception handler
          if is_python_signal_handler:
              signal.signal(signal.SIGINT, old_signal)
  
imports: import collections.abc
  import functools
  import os
  import platform
  import signal
  import sys
  from colorsys import rgb_to_hls
  from contextlib import contextmanager
  from ctypes import c_char_p, c_void_p, cdll
  from pathlib import Path
  import numpy
  from ...fixes import _compare_version
  from ...utils import _check_qt_version, _validate_type, logger, warn
  from ..utils import _get_cmap
label_desc: Use image node_id 8 for calling a global function with example usage: _qt_app_exec(app) without return types