class_docstr: Concatenates context features and example features in a listwise manner.
  
  Given dicts of `context features`, `example features`, this layer expands
  list_size times for the `context_features` and concatenates them with
  example features along the `list_size` axis. The output is a 3-d tensor with
  shape [batch_size, list_size, sum(feature_dims)], where sum(feature_dims) is
  the sum of all example feature dimensions and the context feature dimension.
  
  Example usage:
  
  ConcatFeatures with circular padding.
  
  ```python
  # Batch size = 2, list_size = 2.
  context_features = {
      'context_feature_1': [[1.], [2.]]
  }
  example_features = {
        'example_feature_1':
            [[[1., 0.], [0., 1.]], [[0., 1.], [1., 0.]]]
  }
  mask = [[True, False], [True, True]]
  concat_tensor = ConcatFeatures()(inputs=(context_features,
      example_features, mask))
  concat_tensor.numpy()
  # Returns: [[[1., 1., 0.], [1., 1., 0.]], [[2., 0., 1.], [2., 1., 0.]]])
  ```
  
  ConcatFeatures without circular padding.
  
  ```python
  concat_tensor = ConcatFeatures(circular_padding=False)(
     inputs=(context_features, example_features, mask))
  concat_tensor.numpy()
  # Returns: [[[1., 1., 0.], [1., 0., 1.]], [[2., 0., 1.], [2., 1., 0.]]]
  ```
docstr: Call layer to flatten context_features and example_features.
  
  Args:
    inputs: A tuple of (context_features, example_features, list_mask), which
      are described below:
    * `context_features`: A map of context features to 2D tensors of shape
      [batch_size, feature_dim].
    * `example_features`: A map of example features to 3D tensors of shape
      [batch_size, list_size, feature_dim].
    * `list_mask`: A Tensor of shape [batch_size, list_size] to mask out the
      invalid examples.
  
  Returns:
    A tensor of shape [batch_size, list_size, concat_feature_dim].
docstr_tok: ["Call","layer","to","flatten","context_features","and","example_features",".","Args",":","inputs",":","A","tuple","of","(","context_features",",","example_features",",","list_mask",")",",","which","are","described","below",":","*","`","context_features","`",":","A","map","of","context","features","to","2D","tensors","of","shape","[","batch_size",",","feature_dim","]",".","*","`","example_features","`",":","A","map","of","example","features","to","3D","tensors","of","shape","[","batch_size",",","list_size",",","feature_dim","]",".","*","`","list_mask","`",":","A","Tensor","of","shape","[","batch_size",",","list_size","]","to","mask","out","the","invalid","examples",".","Returns",":","A","tensor","of","shape","[","batch_size",",","list_size",",","concat_feature_dim","]","."]
code: def call(
      self,
      inputs: Tuple[
          Dict[str, tf.Tensor], Dict[str, tf.Tensor], tf.Tensor
      ],
  ) -> Tuple[Dict[str, tf.Tensor], Dict[str, tf.Tensor]]:
      """Call layer to flatten context_features and example_features.
  
      Args:
        inputs: A tuple of (context_features, example_features, list_mask), which
          are described below:
        * `context_features`: A map of context features to 2D tensors of shape
          [batch_size, feature_dim].
        * `example_features`: A map of example features to 3D tensors of shape
          [batch_size, list_size, feature_dim].
        * `list_mask`: A Tensor of shape [batch_size, list_size] to mask out the
          invalid examples.
  
      Returns:
        A tensor of shape [batch_size, list_size, concat_feature_dim].
      """
      context_features, example_features, list_mask = inputs
      (
          flattened_context_features,
          flattened_example_features,
      ) = self._flatten_list(
          (context_features, example_features, list_mask)
      )
      # Concatenate flattened context and example features along `list_size` dim.
      context_input = [
          tf.keras.layers.Flatten()(flattened_context_features[name])
          for name in sorted(flattened_context_features)
      ]
      example_input = [
          tf.keras.layers.Flatten()(flattened_example_features[name])
          for name in sorted(flattened_example_features)
      ]
      flattened_concat_features = tf.concat(
          context_input + example_input, 1
      )
  
      # Reshape to 3D.
      batch_size = tf.shape(list_mask)[0]
      list_size = tf.shape(list_mask)[1]
      return utils.reshape_first_ndims(
          flattened_concat_features, 1, [batch_size, list_size]
      )
  
imports: import math
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import tensorflow
  from tensorflow_ranking.python import utils
label_desc: Use image node_id 2 for calling the ConcatFeatures obj's underlying member method code with example usage: obj.call(inputs) and returns: utils