class_docstr: Featurizer using ConveRT model.
  
  Loads the ConveRT(https://github.com/PolyAI-LDN/polyai-models#convert)
  model from TFHub and computes sentence and sequence level feature representations
  for dense featurizable attributes of each message object.
class_docstr_tok: ["Featurizer","using","ConveRT","model",".","Loads","the","ConveRT","(","https",":","\/\/github.com\/PolyAI-LDN\/polyai-models","#","convert",")","model","from","TFHub","and","computes","sentence","and","sequence","level","feature","representations","for","dense","featurizable","attributes","of","each","message","object","."]
docstr: Validates the specified `model_url` parameter.
  
  The `model_url` parameter cannot be left empty. It can either
  be set to a remote URL where the model is hosted or it can be
  a path to a local directory.
  
  Args:
      config: a configuration for this graph component
docstr_tok: ["Validates","the","specified","`","model_url","`","parameter",".","The","`","model_url","`","parameter","can","not","be","left","empty",".","It","can","either","be","set","to","a","remote","URL","where","the","model","is","hosted","or","it","can","be","a","path","to","a","local","directory",".","Args",":","config",":","a","configuration","for","this","graph","component"]
code: def _validate_model_url(cls, config: Dict[Text, Any]) -> None:
      """Validates the specified `model_url` parameter.
  
      The `model_url` parameter cannot be left empty. It can either
      be set to a remote URL where the model is hosted or it can be
      a path to a local directory.
  
      Args:
          config: a configuration for this graph component
      """
      model_url = config.get("model_url", None)
  
      if not model_url:
          raise RasaException(
              f"Parameter 'model_url' was not specified in the configuration "
              f"of '{ConveRTFeaturizer.__name__}'. "
              f"It is mandatory to pass a value for this parameter. "
              f"You can either use a community hosted URL of the model "
              f"or if you have a local copy of the model, pass the "
              f"path to the directory containing the model files."
          )
  
      if model_url == ORIGINAL_TF_HUB_MODULE_URL:
          # Can't use the originally hosted URL
          raise RasaException(
              f"Parameter 'model_url' of "
              f"'{ConveRTFeaturizer.__name__}' was "
              f"set to '{model_url}' which does not contain the model any longer. "
              f"You can either use a community hosted URL or if you have a "
              f"local copy of the model, pass the path to the directory "
              f"containing the model files."
          )
  
      if model_url == RESTRICTED_ACCESS_URL:
          # Can't use the URL that is reserved for tests only
          raise RasaException(
              f"Parameter 'model_url' of "
              f"'{ConveRTFeaturizer.__name__}' was "
              f"set to '{model_url}' which is strictly reserved for pytests of "
              f"Rasa Open Source only. Due to licensing issues you are "
              f"not allowed to use the model from this URL. "
              f"You can either use a community hosted URL or if you have a "
              f"local copy of the model, pass the path to the directory "
              f"containing the model files."
          )
  
      if os.path.isfile(model_url):
          # Definitely invalid since the specified path should be a directory
          raise RasaException(
              f"Parameter 'model_url' of "
              f"'{ConveRTFeaturizer.__name__}' was "
              f"set to the path of a file which is invalid. You "
              f"can either use a community hosted URL or if you have a "
              f"local copy of the model, pass the path to the directory "
              f"containing the model files."
          )
  
      if not rasa.nlu.utils.is_url(model_url) and not os.path.isdir(
          model_url
      ):
          raise RasaException(
              f"{model_url} is neither a valid remote URL nor a local directory. "
              f"You can either use a community hosted URL or if you have a "
              f"local copy of the model, pass the path to "
              f"the directory containing the model files."
          )
  
      if os.path.isdir(model_url):
          # Looks like a local directory. Inspect the directory
          # to see if model files exist.
          cls._validate_model_files_exist(model_url)
  
imports: from __future__ import annotations
  import logging
  import os
  from typing import Any, Dict, List, Optional, Text, Tuple, Type
  import tensorflow
  from tensorflow.python.eager.wrap_function import WrappedFunction
  from tqdm import tqdm
  import numpy
  from rasa.engine.graph import GraphComponent, ExecutionContext
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.storage.resource import Resource
  import rasa.shared.utils.io
  import rasa.core.utils
  from rasa.nlu.tokenizers.tokenizer import Token, Tokenizer
  from rasa.nlu.featurizers.dense_featurizer.dense_featurizer import DenseFeaturizer
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.nlu.constants import DENSE_FEATURIZABLE_ATTRIBUTES, TOKENS_NAMES, NUMBER_OF_SUB_TOKENS
  from rasa.shared.nlu.constants import TEXT, ACTION_TEXT
  from rasa.exceptions import RasaException
  import rasa.nlu.utils
  import rasa.utils.train_utils
label_desc: Use image node_id 9 for calling the ConveRTFeaturizer obj's underlying member method code with example usage: obj._validate_model_url(cls, config) without return types