code: def create_tower(
      hidden_layer_dims: List[int],
      output_units: int,
      activation: Optional[Callable[..., tf.Tensor]] = None,
      input_batch_norm: bool = False,
      use_batch_norm: bool = True,
      batch_norm_moment: float = 0.999,
      dropout: float = 0.5,
      name: Optional[str] = None,
      **kwargs: Dict[Any, Any],
  ):
      """Creates a feed-forward network as `tf.keras.Sequential`.
  
      It creates a feed-forward network with batch normalization and dropout, and
      optionally applies batch normalization on inputs.
  
      Example usage:
      ```python
      tower = create_tower(hidden_layer_dims=[64, 32, 16], output_units=1)
      inputs = tf.ones([2, 3, 1])
      tower_logits = tower(inputs)
      ```
  
      Args:
        hidden_layer_dims: Iterable of number hidden units per layer. All layers are
          fully connected. Ex. `[64, 32]` means first layer has 64 nodes and second
          one has 32.
        output_units: Size of output logits from this tower.
        activation: Activation function applied to each layer. If `None`, will use
          an identity activation.
        input_batch_norm: Whether to use batch normalization for input layer.
        use_batch_norm: Whether to use batch normalization after each hidden layer.
        batch_norm_moment: Momentum for the moving average in batch normalization.
        dropout: When not `None`, the probability we will drop out a given
          coordinate.
        name: Name of the Keras layer.
        **kwargs: Keyword arguments for every `tf.keras.Dense` layers.
  
      Returns:
        A `tf.keras.Sequential` object.
      """
      model = tf.keras.Sequential(name=name)
      # Input batch normalization.
      if input_batch_norm:
          model.add(
              tf.keras.layers.BatchNormalization(
                  momentum=batch_norm_moment
              )
          )
      for layer_width in hidden_layer_dims:
          model.add(tf.keras.layers.Dense(units=layer_width), **kwargs)
          if use_batch_norm:
              model.add(
                  tf.keras.layers.BatchNormalization(
                      momentum=batch_norm_moment
                  )
              )
          model.add(tf.keras.layers.Activation(activation=activation))
          if dropout:
              model.add(tf.keras.layers.Dropout(rate=dropout))
      model.add(tf.keras.layers.Dense(units=output_units), **kwargs)
      return model
  
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 for calling a global function with example usage: create_tower(hidden_layer_dims, output_units, activation, input_batch_norm, use_batch_norm, batch_norm_moment, dropout, name) and returns: model