code: def _make_tower_layers(
      hidden_layer_dims,
      output_units,
      activation=None,
      use_batch_norm=True,
      batch_norm_moment=0.999,
      dropout=0.5,
  ):
      """Defines tower using keras layers.
  
      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: (int) Size of output logits from this tower.
       activation: Activation function applied to each layer. If `None`, will use
            an identity activation, which is default behavior in Keras activations.
       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.
  
      Returns:
        A list of Keras layers for this tower.
      """
      layers = []
      if not hidden_layer_dims:
          return layers
      if use_batch_norm:
          layers.append(
              tf.keras.layers.BatchNormalization(
                  momentum=batch_norm_moment
              )
          )
      for layer_width in hidden_layer_dims:
          layers.append(tf.keras.layers.Dense(units=layer_width))
          if use_batch_norm:
              layers.append(
                  tf.keras.layers.BatchNormalization(
                      momentum=batch_norm_moment
                  )
              )
          layers.append(
              tf.keras.layers.Activation(activation=activation)
          )
          if dropout:
              layers.append(tf.keras.layers.Dropout(rate=dropout))
      layers.append(tf.keras.layers.Dense(units=output_units))
      return layers
  
file_path: ranking/tensorflow_ranking/python/keras/canned/gam.py
imports: import tensorflow.compat.v2
  from tensorflow_ranking.python.keras import network
label_desc: Use image node_id 1 for calling a global function with example usage: _make_tower_layers(hidden_layer_dims, output_units, activation, use_batch_norm, batch_norm_moment, dropout) and returns: layers, layers