code: def room_exists(jid):
      
  
      def _room_exists(xmpp):
          disco = xmpp.plugin['xep_0030']
          try:
              disco.get_info(jid)
          except IqError as e:
              if e.condition == 'item-not-found':
                  return False
              raise
          else:
              return True
  
      return _execute_xmpp(_room_exists)
docs: Checks if a MUC room exists on the server.