input: Write a function to train a multi-layer perceptron to identify MNIST handwritten digits using the provided dataset and code.
  
  def train_mnist():
      # import libraries 
      from keras.models import Sequential 
      from keras.layers import Dense, Dropout 
      import numpy 
  
      # load the dataset 
      dataset = numpy.loadtxt("mnist.csv", delimiter=",") 
  
      # split into input (X) and output (Y) variables 
      X = dataset[:,0:784] 
      Y = dataset[:,784] 
  
      # Create model
      model = Sequential() 
      model.add(Dense(784, input_dim=784, activation='relu'))
      model.add(Dense(256, activation='relu')) 
      model.add(Dense(128, activation='relu'))
      model.add(Dense(10, activation='softmax'))
  
      # Compile model 
      model.compile(loss='sparse_categorical_crossentropy', optimizer='adam', metrics=['accuracy']) 
  
      # Fit the model 
      model.fit(X, Y, epochs=10, batch_size=128, verbose=2)
  
      # Evaluate the model 
      scores = model.evaluate(X, Y) 
      return scores[1] * 100
  
  assert train_mnist() == 95.0  # Assuming a typical accuracy for MNIST
  assert train_mnist() > 90.0
  assert train_mnist() > 80.0
  assert train_mnist() > 70.0
  assert train_mnist() > 60.0
output: 
  def train_mnist():
      from keras.models import Sequential 
      from keras.layers import Dense, Dropout 
      import numpy 
  
      dataset = numpy.loadtxt("mnist.csv", delimiter=",") 
      X = dataset[:,0:784] 
      Y = dataset[:,784] 
  
      model = Sequential() 
      model.add(Dense(784, input_dim=784, activation='relu'))
      model.add(Dense(256, activation='relu')) 
      model.add(Dense(128, activation='relu'))
      model.add(Dense(10, activation='softmax'))
  
      model.compile(loss='sparse_categorical_crossentropy', optimizer='adam', metrics=['accuracy']) 
  
      model.fit(X, Y, epochs=10, batch_size=128, verbose=2)
  
      scores = model.evaluate(X, Y) 
      return scores[1] * 100
  