code: def stop_event(self):
          
          self.logger.debug('stopping')
          try:
              self.on_stop()
          except Exception as ex:
              self.logger.exception(ex)
          for name in self.outputs:
              self.send(name, None)
docs: Called by the event loop when it is stopped.
  
          Calls :py:meth:`on_stop`, then sends :py:data:`None` to each
          output to shut down the rest of the processing pipeline.