class_docstr: Layer to flatten the example list.
  
  This layer flattens the batch_size dimension and the list_size dimension for
  the `example_features` and expands list_size times for the `context_features`.
  
  Example usage:
  
  ```python
  context_features = {'context_feature_1': [[1], [0]]}
  example_features = {'example_feature_1':
                      [[[1], [0], [-1]], [[0], [1], [0]]]}
  mask = [[True, True, False], [True, False, False]]
  flattened_context_features, flattened_example_features = FlattenList()(
      inputs=(context_features, example_features, mask))
  ```
  That is, there are two valid examples in the first query and one
  valid example in the second query. Then
  
  ```python
  flattened_context_features = {'context_feature_1':
                                [[1], [1], [1], [0], [0], [0]]}
  flattened_example_features = {'example_feature_1':
                                [[1], [0], [1], [0], [0], [0]]}
  ```
  `context_feature_1` is repeated by list_size=3 times. `example_feature_1` is
  flattened and padded with the invalid terms replaced by valid terms in each
  query in a circular way.
docstr: Initializes the FlattenList 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","FlattenList","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 FlattenList 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
  
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 FlattenList object from inherited base classes: tf.keras.layers with example: obj = FlattenList(circular_padding, name)