code: def declare(self, exchange='', exchange_type='direct', passive=False,
                  durable=False, auto_delete=False, arguments=None):
          
          if not compatibility.is_string(exchange):
              raise AMQPInvalidArgument('exchange should be a string')
          elif not compatibility.is_string(exchange_type):
              raise AMQPInvalidArgument('exchange_type should be a string')
          elif not isinstance(passive, bool):
              raise AMQPInvalidArgument('passive should be a boolean')
          elif not isinstance(durable, bool):
              raise AMQPInvalidArgument('durable should be a boolean')
          elif not isinstance(auto_delete, bool):
              raise AMQPInvalidArgument('auto_delete should be a boolean')
          elif arguments is not None and not isinstance(arguments, dict):
              raise AMQPInvalidArgument('arguments should be a dict or None')
  
          declare_frame = pamqp_exchange.Declare(exchange=exchange,
                                                 exchange_type=exchange_type,
                                                 passive=passive,
                                                 durable=durable,
                                                 auto_delete=auto_delete,
                                                 arguments=arguments)
          return self._channel.rpc_request(declare_frame)
docs: Declare an Exchange.
  
          :param str exchange: Exchange name
          :param str exchange_type: Exchange type
          :param bool passive: Do not create
          :param bool durable: Durable exchange
          :param bool auto_delete: Automatically delete when not in use
          :param dict arguments: Exchange key/value arguments
  
          :raises AMQPInvalidArgument: Invalid Parameters
          :raises AMQPChannelError: Raises if the channel encountered an error.
          :raises AMQPConnectionError: Raises if the connection
                                       encountered an error.
  
          :rtype: dict