code: def signals(self, signals=('QUIT', 'USR1', 'USR2')):
          '''Register our signal handler'''
          for sig in signals:
              signal.signal(getattr(signal, 'SIG' + sig), self.handlerf signals(self, signals=('QUIT', 'USR1', 'USR2')):
          '''Register our signal handler'''
          for sig in signals:
              signal.signal(getattr(signal, 'SIG' + sig), self.handler)
docs: Register our signal handler