<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bind_queues(self, bindings):
 """ Declare a set of bindings between queues and exchanges. Args: bindings (list of dict):
 A list of binding definitions. Each dictionary must contain the "queue" key whose value is the name of the queue to create the binding on, as well as the "exchange" key whose value should be the name of the exchange to bind to. Additional acceptable keys are any keyword arguments accepted by :meth:`pika.channel.Channel.queue_bind`. Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. BadDeclaration: If a binding could not be declared. This can occur if the queue or exchange don't exist, or if they do, but the current user does not have permissions to create bindings. """

        channel = yield self._allocate_channel()
        try:
            for binding in bindings:
                try:
                    yield channel.queue_bind(**binding)
                except pika.exceptions.ChannelClosed as e:
                    raise BadDeclaration("binding", binding, e)
        finally:
            try:
                channel.close()
            except pika.exceptions.AMQPError:
                pass