input: Write a function to construct a neural network model in Python using Keras to classify the MNIST dataset correctly. The function should define the model architecture, compile the model with the appropriate optimizer, loss function, and metrics, and then return the compiled model.
  
  def mnist_classifier_model():
      import keras
      input_layer = keras.layers.Input(shape=(784,))
      hidden_layer = keras.layers.Dense(128, activation='relu')(input_layer)
      output_layer = keras.layers.Dense(10, activation='softmax')(hidden_layer)
      model = keras.Model(inputs=input_layer, outputs=output_layer)
      model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
      return model
  
  assert type(mnist_classifier_model()) == keras.Model
  assert mnist_classifier_model().optimizer.__class__.__name__ == 'Adam'
  assert mnist_classifier_model().loss == 'sparse_categorical_crossentropy'
output: def mnist_classifier_model():
      import keras
      input_layer = keras.layers.Input(shape=(784,))
      hidden_layer = keras.layers.Dense(128, activation='relu')(input_layer)
      output_layer = keras.layers.Dense(10, activation='softmax')(hidden_layer)
      model = keras.Model(inputs=input_layer, outputs=output_layer)
      model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
      return model