code: def register_exit_handler_and_exit_gracefully_on_sigint(
      handler: Callable[..., None], *args, **kargs
  ):
      """Register an exit handler and gracefully handle SIGINT."""
      exit_handler = register_exit_handler(handler, *args, **kargs)
      exit_gracefully_on_sigint()
      return exit_handler
  
file_path: launchpad/launchpad/launch/signal_handling.py
imports: import atexit
  import signal
  import sys
  from typing import Callable
label_desc: Use image node_id 5 for calling a global function with example usage: register_exit_handler_and_exit_gracefully_on_sigint(handler) and returns: exit_handler