class_docstr: Univariate BERT-based scorer.
class_docstr_tok: ["Univariate","BERT-based","scorer","."]
docstr: See `UnivariateScorer`.
code: def _score_flattened(
      self,
      context_features: TensorDict,
      example_features: TensorDict,
  ) -> tf.Tensor:
      """See `UnivariateScorer`."""
      # See BertEncoder class for `encoder` outputs.
      bert_output = self.encoder(example_features)
      pooled_output = bert_output["pooled_output"]
      output = self._dropout_layer(pooled_output)
      return self._score_layer(output)
  
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 TFRBertScorer obj's underlying member method code with example usage: obj._score_flattened(context_features, example_features) and returns: self