input: Write a function to create a neural network model in Python using TensorFlow/Keras that can recognize handwritten digits from 0 to 9, load and preprocess the MNIST dataset, and train the model. The function should return the trained model.
  assert model_creation()[0].evaluate(X_test.reshape(10000, 784).astype('float32')/255, to_categorical(y_test, num_classes=10))[1] >= 0.9
  assert model_creation()[1] == 'Trained model for handwritten digit recognition using MNIST dataset.'
  assert model_creation()[0].predict(X_test[0].reshape(1, 784).astype('float32')/255).argmax() == y_test[0]
output: def model_creation():
      import tensorflow as tf
      from tensorflow.keras.datasets import mnist
      from tensorflow.keras.utils import to_categorical
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Dense
  
      (X_train, y_train), (X_test, y_test) = mnist.load_data()
      X_train = X_train.reshape(60000, 784).astype('float32') / 255
      X_test = X_test.reshape(10000, 784).astype('float32') / 255
      y_train = to_categorical(y_train, num_classes=10)
      y_test = to_categorical(y_test, num_classes=10)
  
      model = Sequential([
          Dense(128, activation='relu', input_shape=(784,)),
          Dense(64, activation='relu'),
          Dense(10, activation='softmax')
      ])
  
      model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
      model.fit(X_train, y_train, epochs=5, batch_size=32, validation_data=(X_test, y_test))
  
      return model, 'Trained model for handwritten digit recognition using MNIST dataset.'