class_docstr: T5 text encoder.
class_docstr_tok: ["T5","text","encoder","."]
code: def get_pretrained_vars(self) -> tuple[FrozenDict, FrozenDict]:
      if self.config_name == "debug":
          return flax.core.freeze({}), flax.core.freeze({})
      else:
          t5_checkpoint_state = t5x_checkpoints.load_t5x_checkpoint(
              CHECKPOINTS[self.config_name]
          )
          # TODO(sacastro): use `t5_checkpoint_state['state']['param_states']`?
          #   For initializing the optimizer stats.
          params = flax.core.freeze(
              {
                  "EncoderDecoder_0": {
                      k: v
                      for k, v in t5_checkpoint_state["target"].items()
                      if k in {"encoder", "token_embedder"}
                  }
              }
          )
          params = jax.tree_util.tree_map(
              lambda x: x.astype(jnp.float32), params
          )
          return params, flax.core.freeze({})
  
file_path: scenic/scenic/projects/lang4video/model/t5.py
imports: import dataclasses
  from typing import Optional
  import flax
  from flax.core.frozen_dict import FrozenDict
  import flax.linen
  import jax
  import jax.numpy
  from scenic.projects.lang4video.model.base_encoders import TextEncoder
  from t5x import checkpoints
  from flaxformer.architectures.t5 import t5_1_1
label_desc: Use image node_id 2 for calling the T5TextEncoder obj's underlying member method code with example usage: obj.get_pretrained_vars() and returns: flax,  flax, params,  flax