input: Write a function to construct a neural network model in Python using Keras that correctly classifies the MNIST dataset. The function should accept no input parameters and return a compiled Keras model. The MNIST dataset should be classified into 10 categories, representing numbers from 0 to 9.
  assert isinstance(construct_mnist_model(), keras.Model)
  model = construct_mnist_model()
  assert model.layers[0].input_shape == (None, 784)
  assert model.layers[1].units == 128
  assert model.layers[2].units == 10
  assert model.optimizer.get_config()['name'] == 'Adam'
output: def construct_mnist_model():
      from tensorflow.keras import Sequential
      from tensorflow.keras.layers import Dense, Flatten
      from tensorflow.keras.optimizers import Adam
      
      model = Sequential([
          Flatten(input_shape=(28, 28)),
          Dense(128, activation='relu'),
          Dense(10, activation='softmax')
      ])
      
      model.compile(optimizer=Adam(), loss='sparse_categorical_crossentropy', metrics=['accuracy'])
      return model