input: Write a function to develop a Python script that trains a multi-layer perceptron to identify MNIST handwritten digits. The function should compile and fit the model, and then evaluate it to print the accuracy.
  assert mnist_mlp()==None
  assert mnist_mlp()==None
  assert mnist_mlp()==None
  assert mnist_mlp()==None
  assert mnist_mlp()==None
output: 
  def mnist_mlp():
      from tensorflow.keras.datasets import mnist
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Dense
      from tensorflow.keras.utils import to_categorical
  
      (x_train, y_train), (x_test, y_test) = mnist.load_data()
      x_train = x_train.reshape(x_train.shape[0], 28*28).astype('float32') / 255
      x_test = x_test.reshape(x_test.shape[0], 28*28).astype('float32') / 255
      y_train = to_categorical(y_train, 10)
      y_test = to_categorical(y_test, 10)
  
      model = Sequential()
      model.add(Dense(512, activation='relu', input_shape=(28*28,)))
      model.add(Dense(256, activation='relu'))
      model.add(Dense(10, activation='softmax'))
  
      model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
      model.fit(x_train, y_train, epochs=10, batch_size=128, verbose=0)
  
      _, accuracy = model.evaluate(x_test, y_test, verbose=0)
      print(f'Accuracy: {accuracy:.4f}')
  