code: def declare_queues(self, queues):
          
          channel = yield self._allocate_channel()
          try:
              for queue in queues:
                  args = queue.copy()
                  args.setdefault("passive", config.conf["passive_declares"])
                  try:
                      yield channel.queue_declare(**args)
                  except pika.exceptions.ChannelClosed as e:
                      raise BadDeclaration("queue", args, e)
          finally:
              try:
                  channel.close()
              except pika.exceptions.AMQPError:
                  pass
docs: Declare a list of queues.
  
          Args:
              queues (list of dict): A list of dictionaries, where each dictionary
                  represents an exchange. Each dictionary can have the following keys:
  
                    * queue (str): The name of the queue
                    * passive (bool): If true, this will just assert that the queue exists,
                      but won't create it if it doesn't. Defaults to the configuration value
                      :ref:`conf-passive-declares`
                    * durable (bool): Whether or not the queue is durable
                    * exclusive (bool): Whether or not the queue is exclusive to this connection.
                    * auto_delete (bool): Whether or not the queue should be automatically
                      deleted once this connection ends.
                    * arguments (dict): Additional arguments for the creation of the queue.
          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 queue could not be declared. This can occur
                  if the queue already exists, but does its type does not match
                  (e.g. it is declared as a durable queue, but exists as a non-durable
                  queue). It can also occur if it does not exist, but the current
                  user does not have permissions to create the object.