code: def set_nick(self, new_nick):
          
  
          stanza = aioxmpp.Presence(
              type_=aioxmpp.PresenceType.AVAILABLE,
              to=self._mucjid.replace(resource=new_nick),
          )
          yield from self._service.client.send(
              stanza
          )
docs: Change the nick name of the occupant.
  
          :param new_nick: New nickname to use
          :type new_nick: :class:`str`
  
          This sends the request to change the nickname and waits for the request
          to be sent over the stream.
  
          The nick change may or may not happen, or the service may modify the
          nickname; observe the :meth:`on_nick_change` event.
  
          .. seealso::
  
              :meth:`.AbstractConversation.set_nick` for the full interface
              specification.