class_docstr: Task object for tf-ranking BERT.
class_docstr_tok: ["Task","object","for","tf-ranking","BERT","."]
code: def build_model(self):
      encoder_network = encoders.build_encoder(
          self.task_config.model.encoder
      )
      preprocess_dict = {}
      scorer = TFRBertScorer(
          encoder=encoder_network,
          bert_output_dropout=self.task_config.model.dropout_rate,
      )
  
      example_feature_spec = {
          "input_word_ids": tf.io.FixedLenFeature(
              shape=(None,), dtype=tf.int64
          ),
          "input_mask": tf.io.FixedLenFeature(
              shape=(None,), dtype=tf.int64
          ),
          "input_type_ids": tf.io.FixedLenFeature(
              shape=(None,), dtype=tf.int64
          ),
      }
      context_feature_spec = {}
  
      model_builder = TFRBertModelBuilder(
          input_creator=tfr_model.FeatureSpecInputCreator(
              context_feature_spec, example_feature_spec
          ),
          preprocessor=tfr_model.PreprocessorWithSpec(preprocess_dict),
          scorer=scorer,
          mask_feature_name=self._task_config.train_data.mask_feature_name,
          name="tfrbert_model",
      )
      return model_builder.build()
  
imports: import dataclasses
  import os
  import time
  from typing import Dict, Mapping, Optional, Tuple
  from absl import logging
  import numpy
  import tensorflow
  from official.core import task_factory
  from official.modeling.hyperparams import base_config
  from official.nlp.configs import encoders
  from tensorflow_ranking.extension import task
  from tensorflow_ranking.python.keras import metrics
  from tensorflow_ranking.python.keras import model
label_desc: Use image node_id 2 for calling the TFRBertTask obj's underlying member method code with example usage: obj.build_model() and returns: model_builder