class_docstr: BERT text encoder.
class_docstr_tok: ["BERT","text","encoder","."]
code: def get_pretrained_vars(
      self,
  ) -> tuple[frozen_dict.FrozenDict, frozen_dict.FrozenDict]:
      if self.config_name == "debug":
          return flax.core.freeze({}), flax.core.freeze({})
      else:
          (
              encoder_params,
              pooler_params,
              mlm_head_params,
              _,
          ) = load_params_from_tf_checkpoint(
              checkpoint_path=CHECKPOINTS[f"{self.config_name}-uncased"]
          )
          params = {
              "BertEncoder_0": encoder_params,
          }
          if self.pretraining_mode:
              params["BertPooler_0"] = pooler_params
              if self.compute_mlm:
                  params["MLMHead_0"] = mlm_head_params
          params = flax.core.freeze(params)
          params = jax.tree_util.tree_map(
              lambda x: x.astype(jnp.float32), params
          )
          return params, flax.core.freeze({})
  
imports: import dataclasses
  from typing import Any
  from typing import Optional
  from typing import Union
  import flax
  from flax.core import frozen_dict
  import flax.linen
  import jax
  import jax.numpy
  from scenic.projects.lang4video.model.base_encoders import TextEncoder
  import tensorflow
  from flaxformer.architectures.bert import bert
  from flaxformer.architectures.bert import bert_checkpoint_converter
  import flaxformer.architectures.bert.configs
  import flaxformer.architectures.bert.heads
label_desc: Use image node_id 2 for calling the BertTextEncoder obj's underlying member method code with example usage: obj.get_pretrained_vars() and returns: flax,  flax, params,  flax