code: def nlp_embedding_and_tokenizer(model_name, max_len, uae, backend):
      """
      A fixture to build nlp embedding and tokenizer models based on the HuggingFace pre-trained models.
      """
      backend = "tf" if backend == "tensorflow" else "pt"
  
      # Load tokenizer
      try:
          tokenizer = AutoTokenizer.from_pretrained(model_name)
      except (OSError, HTTPError):
          pytest.skip(
              f"Problem downloading {model_name} from huggingface.co"
          )
      X = "A dummy string"  # this will be padded to max_len
      tokens = tokenizer(
          list(X[:5]),
          pad_to_max_length=True,
          max_length=max_len,
          return_tensors=backend,
      )
  
      # Load embedding model
      emb_type = "hidden_state"
      n_layers = 8
      layers = [-_ for _ in range(1, n_layers + 1)]
      enc_dim = 32
  
      if backend == "tf":
          try:
              embedding = TransformerEmbedding_tf(
                  model_name, emb_type, layers
              )
          except (OSError, HTTPError):
              pytest.skip(
                  f"Problem downloading {model_name} from huggingface.co"
              )
          if uae:
              x_emb = embedding(tokens)
              shape = (x_emb.shape[1],)
              embedding = UAE_tf(
                  input_layer=embedding, shape=shape, enc_dim=enc_dim
              )
      elif backend == "pt":
          try:
              embedding = TransformerEmbedding_pt(
                  model_name, emb_type, layers
              )
          except (OSError, HTTPError):
              pytest.skip(
                  f"Problem downloading {model_name} from huggingface.co"
              )
          if uae:
              x_emb = embedding(tokens)
              shape = (x_emb.shape[1],)
              embedding = UAE_pt(
                  input_layer=embedding, shape=shape, enc_dim=enc_dim
              )
  
      return tokenizer, embedding, max_len, enc_dim
  
imports: from functools import partial
  from importlib import import_module
  import numpy
  import tensorflow
  import torch
  import torch.nn
  from sklearn.ensemble import RandomForestClassifier
  from xgboost import XGBClassifier
  from requests.exceptions import HTTPError
  import pytest
  from pytest_cases import fixture, parametrize
  from transformers import AutoTokenizer
  from alibi_detect.cd.pytorch import UAE
  from alibi_detect.cd.pytorch import preprocess_drift
  from alibi_detect.cd.tensorflow import UAE
  from alibi_detect.cd.tensorflow import preprocess_drift
  from alibi_detect.utils.pytorch.kernels import GaussianRBF
  from alibi_detect.utils.pytorch.kernels import DeepKernel
  from alibi_detect.utils.tensorflow.kernels import GaussianRBF
  from alibi_detect.utils.tensorflow.kernels import DeepKernel
  from alibi_detect.models.pytorch import TransformerEmbedding
  from alibi_detect.models.tensorflow import TransformerEmbedding
  from alibi_detect.cd.pytorch import HiddenOutput
  from alibi_detect.cd.tensorflow import HiddenOutput
  from alibi_detect.utils.frameworks import has_keops
label_desc: Use image node_id 9 for calling a global function with example usage: nlp_embedding_and_tokenizer(model_name, max_len, uae, backend) and returns: tokenizer,  embedding,  max_len,  enc_dim