def consume_receive_quota(self, amount):
        """Consume receive quota. Returns False on failure."""
        if self._receive_quota < amount:
            self._logger.debug('Violate quota on channel id %d: %d < %d' %
                               (self._request.channel_id,
                                self._receive_quota, amount))
            return False
        self._receive_quota -= amount
        return True
dataset/ETHPy150Open google/pywebsocket/mod_pywebsocket/mux.py/_LogicalStream.consume_receive_quota/original