input: 
  from typing import Tuple
  import keras
  
  def construct_mnist_model() -> keras.Model:
      """ Constructs a neural network model using Keras to classify the MNIST dataset.
      The model should have an input layer that takes a flattened 28x28 image, 
      a hidden layer with 128 neurons and a ReLU activation, and an output layer 
      with 10 neurons and a softmax activation for classification. 
      The model should be compiled using the Adam optimizer, with sparse categorical 
      cross-entropy loss, and accuracy as the metric.
      >>> construct_mnist_model()
      <keras.engine.functional.Functional object at 0x7f8b1c1a7d30>
      """
      # Input layer
      input_layer = keras.layers.Input(shape=(784,))
  
      # Hidden layer
      hidden_layer = keras.layers.Dense(128, activation='relu')(input_layer)
  
      # Output layer
      output_layer = keras.layers.Dense(10, activation='softmax')(hidden_layer)
  
      # Model
      model = keras.Model(inputs=input_layer, outputs=output_layer)
  
      # Compile model
      model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
      
      return model
  
output:     # Input layer
      input_layer = keras.layers.Input(shape=(784,))
  
      # Hidden layer
      hidden_layer = keras.layers.Dense(128, activation='relu')(input_layer)
  
      # Output layer
      output_layer = keras.layers.Dense(10, activation='softmax')(hidden_layer)
  
      # Model
      model = keras.Model(inputs=input_layer, outputs=output_layer)
  
      # Compile model
      model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
      
      return model