class_docstr: Interface for scorer.
  
  The `Scorer` class is an abstract class to implement `score` in `ModelBuilder`
  in tfr.keras.
  
  To be implemented by subclasses:
  
    * `__call__()`: Contains the logic to score based on the context and example
    features.
  
  Example subclass implementation:
  
  ```python
  class SimpleScorer(Scorer):
  
    def __call__(self, context_features, example_features, mask):
      x = tf.concat([tensor for tensor in example_features.values()], -1)
      return tf.keras.layers.Dense(1)(x)
  ```
docstr: Scores all examples given context and returns logits.
  
  Args:
    context_features: maps from context feature keys to [batch_size,
      feature_dims]-tensors of preprocessed context features.
    example_features: maps from example feature keys to [batch_size,
      list_size, feature_dims]-tensors of preprocessed example features.
    mask: [batch_size, list_size]-tensor of mask for valid examples.
  
  Returns:
    A [batch_size, list_size]-tensor of logits or a dict mapping task name to
    logits in the multi-task setting.
docstr_tok: ["Scores","all","examples","given","context","and","returns","logits",".","Args",":","context_features",":","maps","from","context","feature","keys","to","[","batch_size",",","feature_dims","]","-tensors","of","preprocessed","context","features",".","example_features",":","maps","from","example","feature","keys","to","[","batch_size",",","list_size",",","feature_dims","]","-tensors","of","preprocessed","example","features",".","mask",":","[","batch_size",",","list_size","]","-tensor","of","mask","for","valid","examples",".","Returns",":","A","[","batch_size",",","list_size","]","-tensor","of","logits","or","a","dict","mapping","task","name","to","logits","in","the","multi-task","setting","."]
code: def __call__(
      self,
      context_features: TensorDict,
      example_features: TensorDict,
      mask: tf.Tensor,
  ) -> Union[TensorLike, TensorDict]:
      """Scores all examples given context and returns logits.
  
      Args:
        context_features: maps from context feature keys to [batch_size,
          feature_dims]-tensors of preprocessed context features.
        example_features: maps from example feature keys to [batch_size,
          list_size, feature_dims]-tensors of preprocessed example features.
        mask: [batch_size, list_size]-tensor of mask for valid examples.
  
      Returns:
        A [batch_size, list_size]-tensor of logits or a dict mapping task name to
        logits in the multi-task setting.
      """
      raise NotImplementedError("Calling an abstract method.")
  
imports: import abc
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  from absl import logging
  import tensorflow
  from tensorflow_ranking.python.keras import feature
  from tensorflow_ranking.python.keras import layers
label_desc: Use image node_id 1 for calling the Scorer obj's underlying member method code with example usage: obj.__call__(context_features, example_features, mask) without return types