code: def enable_death_signal(_warn=True):
      """
      Set the "death signal" of the current process, so that
      the current process will be cleaned with guarantee
      in case the parent dies accidentally.
      """
      if platform.system() != "Linux":
          return
      try:
          import prctl  # pip install python-prctl
      except ImportError:
          if _warn:
              log_once(
                  '"import prctl" failed! Install python-prctl so that processes can be cleaned with guarantee.',
                  "warn",
              )
          return
      else:
          assert hasattr(
              prctl, "set_pdeathsig"
          ), "prctl.set_pdeathsig does not exist! Note that you need to install 'python-prctl' instead of 'prctl'."
          # is SIGHUP a good choice?
          prctl.set_pdeathsig(signal.SIGHUP)
  
imports: import sys
  import atexit
  import bisect
  import multiprocessing
  import platform
  import signal
  import threading
  import weakref
  from contextlib import contextmanager
  import six
  from six.moves import queue
  import subprocess
  from .None import logger
  from .argtools import log_once
label_desc: Use image node_id 2 for calling a global function with example usage: enable_death_signal(_warn) without return types