parameters: (self, sig)
docstring: Internal helper to validate a signal.
  
          Raise ValueError if the signal number is invalid or uncatchable.
          Raise RuntimeError if there is a problem setting up the handler.
docstring_summary: Internal helper to validate a signal.
docstring_tokens: Internal helper to validate a signal .
function: def _check_signal(self, sig):
          """Internal helper to validate a signal.
  
          Raise ValueError if the signal number is invalid or uncatchable.
          Raise RuntimeError if there is a problem setting up the handler.
          """
          if not isinstance(sig, int):
              raise TypeError(f'sig must be an int, not {sig!r}')
  
          if not (1 <= sig < signal.NSIG):
              raise ValueError(f'sig {sig} out of range(1, {signal.NSIG})')
function_tokens: def _check_signal ( self , sig ) : if not isinstance ( sig , int ) : raise TypeError ( f'sig must be an int, not {sig!r}' ) if not ( 1 <= sig < signal . NSIG ) : raise ValueError ( f'sig {sig} out of range(1, {signal.NSIG})' )