code: def declare(self, exchange, type, passive=False, durable=False,
                  nowait=True, arguments=None, ticket=None, cb=None):
          
          nowait = nowait and self.allow_nowait() and not cb
  
          args = Writer()
          args.write_short(ticket or self.default_ticket).\
              write_shortstr(exchange).\
              write_shortstr(type).\
              write_bits(passive, durable, False, False, nowait).\
              write_table(arguments or {})
          self.send_frame(MethodFrame(self.channel_id, 40, 10, args))
  
          if not nowait:
              self._declare_cb.append(cb)
              self.channel.add_synchronous_cb(self._recv_declare_ok)
docs: Declare the exchange.
  
          exchange - The name of the exchange to declare
          type - One of