'Turn Channel flow control off and on.
NOTE: RabbitMQ doesn\'t support active=False; per
https://www.rabbitmq.com/specification.html: "active=false is not
supported by the server. Limiting prefetch with basic.qos provides much
better control"
For more information, please reference:
http://www.rabbitmq.com/amqp-0-9-1-reference.html#channel.flow
:param bool active: Turn flow on (True) or off (False)
:returns: True if broker will start or continue sending; False if not
:rtype: bool'

def flow(self, active):

    with _CallbackResult(self._FlowOkCallbackResultArgs) as flow_ok_result:
        self._impl.flow(callback=flow_ok_result.set_value_once, active=active)
        self._flush_output(flow_ok_result.is_ready)
        return flow_ok_result.value.active
