code: def setup_cleanup_on_exit(namespace: str):
      # Capture sigint so cleanup occurs even on ctrl-C
      sigint = signal.getsignal(signal.SIGINT)
  
      def cleanup(signum, frame):
          signal.signal(signal.SIGINT, sigint)
          cleanup_deployment(namespace)
          sys.exit(1)
  
      signal.signal(signal.SIGINT, cleanup)
  
file_path: wandb/tests/release_tests/test_launch/utils.py
imports: import signal
  import subprocess
  import sys
  from time import sleep
  from typing import Optional
  import wandb
  import yaml
  from kubernetes import client, config, watch
  from wandb.apis.public import Api
label_desc: Use image node_id 7 for calling a global function with example usage: setup_cleanup_on_exit(namespace) without return types