input: Write a function to construct a neural network model in Python using the Keras library to correctly classify the MNIST dataset. The function should return the compiled model.
  import keras
  assert construct_mnist_model().optimizer.__class__.__name__ == 'Adam'
  assert construct_mnist_model().loss == 'sparse_categorical_crossentropy'
  assert len(construct_mnist_model().layers) == 3
  assert construct_mnist_model().layers[1].units == 128
  assert construct_mnist_model().layers[2].units == 10
  assert construct_mnist_model().layers[2].activation.__name__ == 'softmax'
output: def construct_mnist_model():
      model = keras.Sequential([
          keras.layers.Flatten(input_shape=(28, 28)),
          keras.layers.Dense(128, activation='relu'),
          keras.layers.Dense(10, activation='softmax')
      ])
      model.compile(optimizer='adam', loss='sparse_categorical_crossentropy')
      return model