class_docstr: A two-tower image-text encoder model.
class_docstr_tok: ["A","two-tower","image-text","encoder","model","."]
code: def get_pretrained_vars(self) -> tuple[FrozenDict, FrozenDict]:
      (
          image_params,
          image_model_state,
      ) = self.image_encoder.get_pretrained_vars()
      (
          text_params,
          text_model_state,
      ) = self.text_encoder.get_pretrained_vars()
  
      params = flax.core.freeze(
          {
              "image_encoder": image_params,
              "text_encoder": text_params,
          }
      )
  
      model_state = {}
  
      if image_batch_stats := image_model_state.get("batch_stats"):
          model_state.setdefault("batch_stats", {})
          model_state["batch_stats"][
              "image_encoder"
          ] = image_batch_stats
  
      if text_batch_stats := text_model_state.get("batch_stats"):
          model_state.setdefault("batch_stats", {})
          model_state["batch_stats"]["text_encoder"] = text_batch_stats
  
      model_state = flax.core.freeze(model_state)
  
      return params, model_state
  
imports: import abc
  from typing import Literal
  from typing import Optional
  import flax
  from flax.core.frozen_dict import FrozenDict
  import flax.linen
  import jax
  import jax.numpy
label_desc: Use image node_id 9 for calling the ImageTextEncoder obj's underlying member method code with example usage: obj.get_pretrained_vars() and returns: params,  model_state