code: def _make_keras_model(
      hparams: keras_tuner.HyperParameters,
  ) -> tf.keras.Model:
      """Creates a DNN Keras model for classifying penguin data.
  
      Args:
        hparams: Holds HyperParameters for tuning.
  
      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=base.transformed_name(f))
          for f in base.FEATURE_KEYS
      ]
      d = keras.layers.concatenate(inputs)
      for _ in range(int(hparams.get("num_layers"))):
          d = keras.layers.Dense(8, activation="relu")(d)
      outputs = keras.layers.Dense(3)(d)
  
      model = keras.Model(inputs=inputs, outputs=outputs)
      model.compile(
          optimizer=keras.optimizers.Adam(hparams.get("learning_rate")),
          loss=keras.losses.SparseCategoricalCrossentropy(
              from_logits=True
          ),
          metrics=[keras.metrics.SparseCategoricalAccuracy()],
      )
  
      model.summary(print_fn=absl.logging.info)
      return model
  
file_path: tfx/tfx/examples/penguin/penguin_utils_keras.py
imports: import absl
  import keras_tuner
  import tensorflow
  from tensorflow import keras
  import tensorflow_transform
  from tfx import v1
  from tfx.examples.penguin import penguin_utils_base
label_desc: Use image node_id 2 for calling a global function with example usage: _make_keras_model(hparams) and returns: model