input: Write a function to create an AI program that recognizes handwritten letters and digits using Python. The function should load the MNIST dataset, preprocess the data, create a neural network model, compile the model, train it, and finally evaluate it. The function should return the evaluation results as a tuple (loss, accuracy).
  assert recognize_handwritten_digits() == (0.05, 0.98)
output: def recognize_handwritten_digits():
      import tensorflow as tf
      from tensorflow.keras import layers, models
  
      (x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
      x_train = x_train.reshape((60000, 28, 28, 1)).astype('float32') / 255
      x_test = x_test.reshape((10000, 28, 28, 1)).astype('float32') / 255
      y_train = tf.keras.utils.to_categorical(y_train)
      y_test = tf.keras.utils.to_categorical(y_test)
  
      model = models.Sequential([
          layers.Conv2D(32, (3, 3), activation='relu', input_shape=(28, 28, 1)),
          layers.MaxPooling2D((2, 2)),
          layers.Conv2D(64, (3, 3), activation='relu'),
          layers.MaxPooling2D((2, 2)),
          layers.Conv2D(64, (3, 3), activation='relu'),
          layers.Flatten(),
          layers.Dense(64, activation='relu'),
          layers.Dense(10, activation='softmax')
      ])
  
      model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
      model.fit(x_train, y_train, epochs=5, batch_size=64, validation_split=0.1)
  
      loss, accuracy = model.evaluate(x_test, y_test)
      return loss, accuracy