input: Write a function to construct a neural network model in Python using Keras that classifies the MNIST data set correctly. The model should have an input layer, a hidden layer with 128 units, and an output layer. The input layer should accept data with shape (784,), and the output layer should have a softmax activation function. The model should be compiled using the Adam optimizer and the sparse categorical crossentropy loss function, with accuracy as a metric.
  
  assert construct_mnist_model().layers[0].input_shape==[(None, 784)]
  assert construct_mnist_model().layers[1].units==128
  assert construct_mnist_model().layers[2].units==10
  assert construct_mnist_model().optimizer.get_config()['name']=='adam'
  assert construct_mnist_model().loss=='sparse_categorical_crossentropy'
output: def construct_mnist_model():
      model = tf.keras.Sequential([
          tf.keras.layers.InputLayer(input_shape=(784,)),
          tf.keras.layers.Dense(128, activation='relu'),
          tf.keras.layers.Dense(10, activation='softmax')
      ])
      model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
      return model