input: Write a function to construct a neural network model in Python using Keras to classify the MNIST data set correctly. The function should return the compiled model. If the function successfully constructs the model, assert that the output format is correct.
  assert construct_mnist_model().__class__.__name__=="Model"
  assert construct_mnist_model().optimizer.__class__.__name__=="Adam"
  assert construct_mnist_model().loss=="sparse_categorical_crossentropy"
  assert construct_mnist_model().metrics==['accuracy']
output: def construct_mnist_model():
      from tensorflow.keras.models 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