code: def leave(self):
          
          fut = self.on_exit.future()
  
          def cb(**kwargs):
              fut.set_result(None)
              return True  # disconnect
  
          self.on_exit.connect(cb)
  
          presence = aioxmpp.stanza.Presence(
              type_=aioxmpp.structs.PresenceType.UNAVAILABLE,
              to=self._mucjid
          )
          yield from self.service.client.send(presence)
  
          yield from fut
docs: Leave the MUC.