docs: def _turn_sigterm_into_systemexit(): # pragma: no cover
      """
      Attempts to turn a SIGTERM exception into a SystemExit exception.
      """
      try:
          import signal
      except ImportError:
          return
      def handle_term(signo, frame):
          raise SystemExit
      signal.signal(signal.SIGTERM, handle_term)