code: def build_mlp(out_dim, hidden_dims, activation="relu"):
      """Builds a multilayer perceptron (MLP) feedforward neural network.
  
      Arguments:
        out_dim: Integer, the output layer dimension.
        hidden_dims: An array of integers representing the dimensions of hidden
          layers (excluding the output layer).
        activation: String, the activation function for `tf.keras.layers.Dense`.
  
      Returns:
        A `tf.keras.Model` model.
      """
      layers = [
          tf.keras.layers.Dense(dim, activation=activation)
          for dim in hidden_dims
      ]
      layers.append(tf.keras.layers.Dense(out_dim))
      return tf.keras.Sequential(layers)
  
imports: from neural_clustering.models.ncp_base import NCPBase
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: build_mlp(out_dim, hidden_dims, activation) and returns: tf