code: def disconnect(self, receipt=None, headers=None, **keyword_headers):
          
          if not self.transport.is_connected():
              log.debug('Not sending disconnect, already disconnected')
              return
          headers = utils.merge_headers([headers, keyword_headers])
          rec = receipt or utils.get_uuid()
          headers[HDR_RECEIPT] = rec
          self.set_receipt(rec, CMD_DISCONNECT)
          self.send_frame(CMD_DISCONNECT, headers)
docs: Disconnect from the server.
  
          :param str receipt: the receipt to use (once the server acknowledges that receipt, we're
              officially disconnected; optional - if not specified a unique receipt id will
              be generated)
          :param dict headers: a map of any additional headers the broker requires
          :param keyword_headers: any additional headers the broker requires