code: def test_convert_featurizer_train(
      create_or_load_convert_featurizer: Callable[
          [Dict[Text, Any]], ConveRTFeaturizer
      ],
      monkeypatch: MonkeyPatch,
      load: bool,
      whitespace_tokenizer: WhitespaceTokenizer,
  ):
      monkeypatch.setattr(
          ConveRTFeaturizer, "_validate_model_url", lambda _: None
      )
      component_config = {
          FEATURIZER_CLASS_ALIAS: "alias",
          "model_url": RESTRICTED_ACCESS_URL,
      }
      featurizer = create_or_load_convert_featurizer(
          component_config, load=True
      )
  
      sentence = "Hey how are you today ?"
      message = Message(data={TEXT: sentence})
      message.set(RESPONSE, sentence)
  
      td = TrainingData([message])
      whitespace_tokenizer.process_training_data(td)
  
      tokens = featurizer.tokenize(message, attribute=TEXT)
  
      message.set(TOKENS_NAMES[TEXT], tokens)
      message.set(TOKENS_NAMES[RESPONSE], tokens)
  
      featurizer.process_training_data(TrainingData([message]))
  
      expected = np.array(
          [2.2636216, -0.26475656, -1.1358104, -0.49751878, -1.3946456]
      )
      expected_cls = np.array(
          [1.0251294, -0.04053932, -0.7018805, -0.82054937, -0.75054353]
      )
  
      seq_vecs, sent_vecs = message.get_dense_features(TEXT, [])
  
      seq_vecs = seq_vecs.features
      sent_vecs = sent_vecs.features
  
      assert len(tokens) == len(seq_vecs)
      assert np.allclose(seq_vecs[0][:5], expected, atol=1e-5)
      assert np.allclose(sent_vecs[-1][:5], expected_cls, atol=1e-5)
  
      seq_vecs, sent_vecs = message.get_dense_features(RESPONSE, [])
  
      seq_vecs = seq_vecs.features
      sent_vecs = sent_vecs.features
  
      assert len(tokens) == len(seq_vecs)
      assert np.allclose(seq_vecs[0][:5], expected, atol=1e-5)
      assert np.allclose(sent_vecs[-1][:5], expected_cls, atol=1e-5)
  
      seq_vecs, sent_vecs = message.get_dense_features(INTENT, [])
  
      assert seq_vecs is None
      assert sent_vecs is None
  
imports: import numpy
  import pytest
  from typing import Text, Optional, List, Tuple, Dict, Any, Callable
  from pathlib import Path
  import os
  from _pytest.monkeypatch import MonkeyPatch
  from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.nlu.constants import FEATURIZER_CLASS_ALIAS, TOKENS_NAMES, NUMBER_OF_SUB_TOKENS
  from rasa.shared.nlu.constants import TEXT, INTENT, RESPONSE
  from rasa.nlu.featurizers.dense_featurizer.convert_featurizer import ConveRTFeaturizer, RESTRICTED_ACCESS_URL, ORIGINAL_TF_HUB_MODULE_URL
  from rasa.exceptions import RasaException
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.storage.resource import Resource
label_desc: Use image node_id 3 for calling a global function with example usage: test_convert_featurizer_train(create_or_load_convert_featurizer, monkeypatch, load, whitespace_tokenizer) without return types