input: def recognize_handwritten_digits():
      """
      Create a Machine Learning model in Python to recognize handwritten digits from 0 to 9.
      The model uses a neural network built with TensorFlow's Keras API. Loads the MNIST dataset,
      preprocesses the data, builds a simple neural network, and trains the model.
      
      >>> recognize_handwritten_digits()
      # The function does not return any value but trains a model which can be used for prediction.
      """
output:     import tensorflow as tf
      from tensorflow.keras import layers, models
      from tensorflow.keras.datasets import mnist
      from tensorflow.keras.utils import to_categorical
  
      # Load the MNIST dataset
      (train_images, train_labels), (test_images, test_labels) = mnist.load_data()
  
      # Preprocess the data
      train_images = train_images.reshape((60000, 28 * 28)).astype('float32') / 255
      test_images = test_images.reshape((10000, 28 * 28)).astype('float32') / 255
      train_labels = to_categorical(train_labels)
      test_labels = to_categorical(test_labels)
  
      # Build the model
      model = models.Sequential()
      model.add(layers.Dense(512, activation='relu', input_shape=(28 * 28,)))
      model.add(layers.Dense(10, activation='softmax'))
  
      # Compile the model
      model.compile(optimizer='adam',
                    loss='categorical_crossentropy',
                    metrics=['accuracy'])
  
      # Train the model
      model.fit(train_images, train_labels, epochs=5, batch_size=128)
  
      # Evaluate the model
      test_loss, test_acc = model.evaluate(test_images, test_labels)
      print(f'Test accuracy: {test_acc:.4f}')