code: def build_keras_model() -> tf.keras.Model:
      """Creates a DNN Keras model for classifying MNIST data.
  
      Returns:
        A Keras Model.
      """
      # The model below is built with Sequential API, please refer to
      # https://www.tensorflow.org/guide/keras/overview for all API options.
      model = tf.keras.Sequential()
      model.add(
          tf.keras.layers.InputLayer(
              input_shape=(784,), name=transformed_name(IMAGE_KEY)
          )
      )
      model.add(tf.keras.layers.Dense(64, activation="relu"))
      model.add(tf.keras.layers.Dropout(0.2))
      model.add(tf.keras.layers.Dense(64, activation="relu"))
      model.add(tf.keras.layers.Dropout(0.2))
      model.add(tf.keras.layers.Dense(10))
      model.compile(
          loss=tf.keras.losses.SparseCategoricalCrossentropy(
              from_logits=True
          ),
          optimizer=tf.keras.optimizers.RMSprop(lr=0.0015),
          metrics=["sparse_categorical_accuracy"],
      )
      model.summary(print_fn=absl.logging.info)
      return model
  
file_path: tfx/tfx/examples/mnist/mnist_utils_native_keras_base.py
imports: from typing import List
  import absl
  import tensorflow
  import tensorflow_transform
  from tfx.components.trainer.fn_args_utils import DataAccessor
  from tfx_bsl.tfxio import dataset_options
label_desc: Use image node_id 3 for calling a global function with example usage: build_keras_model() and returns: model