input: Write a function to create a Machine Learning model in Python that can recognize handwritten digits from 0 to 9 using TensorFlow and Keras. The function should load the MNIST dataset, preprocess the data, define and compile a neural network model, and then fit the model on the training data. Specifically, the function should reshape the input data, normalize the pixel values, one-hot encode the labels, and set the optimizer, loss function, and metrics for the model. Finally, it should train the model for 5 epochs with a batch size of 128.
  
  assert digit_recognition_model()
  # This assert statement checks if the function executes without errors.
output: def digit_recognition_model():
      import tensorflow as tf
      from tensorflow.keras.datasets import mnist
      from tensorflow.keras.utils import to_cat
      (x_train, y_train), (x_test, y_test) = mnist.load_data()
      x_train = x_train.reshape(-1, 28*28).astype('float32') / 255
      x_test = x_test.reshape(-1, 28*28).astype('float32') / 255
      y_train = to_categorical(y_train, 10)
      y_test = to_categorical(y_test, 10)
      model = tf.keras.Sequential([
          tf.keras.layers.Dense(128, activation='relu', input_shape=(784,)),
          tf.keras.layers.Dense(64, activation='relu'),
          tf.keras.layers.Dense(10, activation='softmax')
      ])
      model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
      model.fit(x_train, y_train, epochs=5, batch_size=128)