code: def signal_to_exception(sig: signal.Signals) -> SignalException:
      
      signal.signal(sig, _sig_exc_handler)
      return SignalException(sig)
docs: Convert a ``signal.Signals`` to a ``SignalException``.
  
      This allows for natural, pythonic signal handing with the use of try-except blocks.
  
      .. code-block:: python
  
          import signal
          import zproc
  
          zproc.signal_to_exception(signals.SIGTERM)
          try:
              ...
          except zproc.SignalException as e:
              print("encountered:", e)
          finally:
              zproc.exception_to_signal(signals.SIGTERM)