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