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: Initializes the ConcatFeatures layer.
  
  Args:
    circular_padding: Whether to apply circular padding to replace invalid
      features with valid ones.
    name: Name of the layer.
    **kwargs: keyword arguments.
docstr_tok: ["Initializes","the","ConcatFeatures","layer",".","Args",":","circular_padding",":","Whether","to","apply","circular","padding","to","replace","invalid","features","with","valid","ones",".","name",":","Name","of","the","layer",".","*","*","kwargs",":","keyword","arguments","."]
code: def __init__(
      self,
      circular_padding: bool = True,
      name: Optional[str] = None,
      **kwargs: Dict[Any, Any],
  ):
      """Initializes the ConcatFeatures layer.
  
      Args:
        circular_padding: Whether to apply circular padding to replace invalid
          features with valid ones.
        name: Name of the layer.
        **kwargs: keyword arguments.
      """
      super().__init__(name=name, **kwargs)
      self._circular_padding = circular_padding
      self._flatten_list = FlattenList(
          circular_padding=self._circular_padding
      )
  
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 1 to create a new ConcatFeatures object from inherited base classes: tf.keras.layers with example: obj = ConcatFeatures(circular_padding, name)