input: Write a function to create a neural network model in Python using Keras that can correctly classify the MNIST data set. The function should include the necessary layers and compilation settings. The function should return the compiled model.
  
  assert create_mnist_model().layers[0].input_shape==[(None, 784)]
  assert create_mnist_model().layers[1].output_shape==(None, 128)
  assert create_mnist_model().layers[2].output_shape==(None, 10)
  assert create_mnist_model().loss=='sparse_categorical_crossentropy'
  assert create_mnist_model().optimizer.get_config()['name']=='Adam'
output: def create_mnist_model():
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Dense
      model = Sequential([
          Dense(128, activation='relu', input_shape=(784,)),
          Dense(10, activation='softmax')
      ])
      model.compile(optimizer='Adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
      return model