class_docstr: Wrapper class for Mesh-TF models.
class_docstr_tok: ["Wrapper","class","for","Mesh-TF","models","."]
code: def estimator(
      self,
      vocabulary,
      init_checkpoint=None,
      disable_tpu=False,
      score_in_predict_mode=False,
      sequence_length=None,
  ):
      if not self._tpu or disable_tpu:
          with gin.unlock_config():
              gin.bind_parameter(
                  "utils.get_variable_dtype.slice_dtype", "float32"
              )
              gin.bind_parameter(
                  "utils.get_variable_dtype.activation_dtype", "float32"
              )
      with gin.unlock_config():
          gin.parse_config(self._gin_bindings)
  
      return mtf_utils.get_estimator(
          model_type=self._model_type,
          vocabulary=vocabulary,
          layout_rules=self._layout_rules,
          mesh_shape=mtf.Shape([]) if disable_tpu else self._mesh_shape,
          mesh_devices=None if disable_tpu else self._mesh_devices,
          model_dir=self._model_dir,
          batch_size=self.batch_size,
          sequence_length=sequence_length or self._sequence_length,
          autostack=self._autostack,
          learning_rate_schedule=self._learning_rate_schedule,
          keep_checkpoint_max=self._keep_checkpoint_max,
          save_checkpoints_steps=self._save_checkpoints_steps,
          optimizer=self._optimizer,
          predict_fn=self._predict_fn,
          variable_filter=self._variable_filter,
          ensemble_inputs=self._ensemble_inputs,
          use_tpu=None if disable_tpu else self._tpu,
          tpu_job_name=self._tpu_job_name,
          iterations_per_loop=self._iterations_per_loop,
          cluster=self._cluster,
          init_checkpoint=init_checkpoint,
          score_in_predict_mode=score_in_predict_mode,
      )
  
imports: import functools
  import os
  import gin
  import gin.tf
  import mesh_tensorflow
  from mesh_tensorflow import optimize
  from mesh_tensorflow.transformer import dataset
  from mesh_tensorflow.transformer import learning_rate_schedules
  from mesh_tensorflow.transformer import utils
  from t5.models import mesh_transformer
  from t5.models import utils
  from t5.models.t5_model import T5Model
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the MtfModel obj's underlying member method code with example usage: obj.estimator(vocabulary, init_checkpoint, disable_tpu, score_in_predict_mode, sequence_length) and returns: mtf_utils