code: def _build_keras_model(feature_list: List[str]) -> tf.keras.Model:
      """Creates a DNN Keras model for classifying penguin data.
  
      Args:
        feature_list: List of feature names.
  
      Returns:
        A Keras Model.
      """
      # The model below is built with Functional API, please refer to
      # https://www.tensorflow.org/guide/keras/overview for all API options.
      inputs = [
          keras.layers.Input(shape=(1,), name=f) for f in feature_list
      ]
      d = keras.layers.concatenate(inputs)
      for _ in range(constants.NUM_LAYERS):
          d = keras.layers.Dense(
              constants.HIDDEN_LAYER_UNITS, activation="relu"
          )(d)
      outputs = keras.layers.Dense(constants.OUTPUT_LAYER_UNITS)(d)
  
      model = keras.Model(inputs=inputs, outputs=outputs)
      model.compile(
          optimizer=keras.optimizers.Adam(constants.LEARNING_RATE),
          loss=keras.losses.SparseCategoricalCrossentropy(
              from_logits=True
          ),
          metrics=[keras.metrics.SparseCategoricalAccuracy()],
      )
  
      model.summary(print_fn=logging.info)
      return model
  
file_path: tfx/tfx/experimental/templates/penguin/models/model.py
imports: from typing import List
  from absl import logging
  import tensorflow
  from tensorflow import keras
  import tensorflow_transform
  from tensorflow_transform.tf_metadata import schema_utils
  from tfx import v1
  from tfx.experimental.templates.penguin.models import constants
  from tfx.experimental.templates.penguin.models import features
  from tfx_bsl.public import tfxio
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: _build_keras_model(feature_list) and returns: model