code: def _register_stop_handler():
      """Showcases the use of lp.register_stop_handler."""
      stop = threading.Event()
  
      def _stop_handler():
          logging.info("_stop_handler called")
          stop.set()
  
      lp.register_stop_handler(_stop_handler)
      stop.wait()
      logging.info("Clean termination of _register_stop_handler node")
      time.sleep(2)
  
file_path: launchpad/launchpad/examples/program_wait/launch.py
imports: import threading
  import time
  from absl import app
  from absl import logging
  import launchpad
label_desc: Use image node_id 4 for calling a global function with example usage: _register_stop_handler() without return types