code: def _generic_signal_handler(self, signal_type):
          
          print("</pre>")
          message = "Got " + signal_type + ". Failing gracefully..."
          self.timestamp(message)
          self.fail_pipeline(KeyboardInterrupt(signal_type), dynamic_recover=True)
          sys.exit(1)
docs: Function for handling both SIGTERM and SIGINT