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.
  assert construct_model().input.shape[1] == 784
  assert construct_model().output.shape[1] == 10
  assert construct_model().loss == 'sparse_categorical_crossentropy'
output: def construct_model():
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Dense, Flatten
  
      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