code: def valid_any_uri(item):
      
      try:
          part = urlparse(item)
      except Exception:
          raise NotValid("AnyURI")
  
      if part[0] == "urn" and part[1] == "":  # A urn
          return True
      # elif part[1] == "localhost" or part[1] == "127.0.0.1":
      #     raise NotValid("AnyURI")
  
      return True
docs: very simplistic, ...