code: def stop_event_stream(self):
          
          if self._stream:
              self._stream.stop()
              self._stream.join()
              self._stream = None
              with self._events.mutex:
                  self._events.queue.clear()
docs: Stop streaming events from `gerrit stream-events`.