def METHOD_NAME(self, write_bytes: bytes) -> None:
    """Part of IProducer interface"""
    if self._write_exception:
        raise self._write_exception
    assert self._finished_deferred is not None
    if self._finished_deferred.called:
        raise Exception("consumer has closed")
    self._bytes_queue.put_nowait(write_bytes)
    # If this is a PushProducer and the queue is getting behind
    # then we pause the producer.
    if self.streaming and self._bytes_queue.qsize() >= self._PAUSE_ON_QUEUE_SIZE:
        self._paused_producer = True
        assert self._producer is not None
        # cast safe because `streaming` means this is an IPushProducer
        cast(IPushProducer, self._producer).pauseProducing()