input: def recognize_handwritten_digits() -> str:
      """Create and train a Machine Learning model in Python that can recognize handwritten digits from 0 to 9.
      The model should be built using a neural network with specified layers and compiled using the Adam optimizer.
      The MNIST dataset is used for training and testing. The function should return the summary of the trained model.
      >>> import tensorflow as tf
      >>> recognize_handwritten_digits()
      Model: "model"
      _________________________________________________________________
      Layer (type)                 Output Shape              Param #   
      =================================================================
      input_1 (InputLayer)         [(None, 784)]             0         
      _________________________________________________________________
      dense (Dense)                (None, 64)                50240     
      _________________________________________________________________
      dropout (Dropout)            (None, 64)                0         
      _________________________________________________________________
      dense_1 (Dense)              (None, 10)                650       
      =================================================================
      Total params: 50,890
      Trainable params: 50,890
      Non-trainable params: 0
      _________________________________________________________________
      """
      import numpy as np
      from tensorflow.keras.datasets import mnist
      from tensorflow.keras.layers import Dense, Input, Dropout
      from tensorflow.keras.models import Model
      from tensorflow.keras.utils import to_categorical
  
      # Loading data
      (X_train, y_train), (X_test, y_test) = mnist.load_data()
  
      # Defining the neural network model
      inputs = Input(shape=(28, 28,))
      h1 = Dense(64, activation='relu')(inputs)
      h2 = Dropout(0.5)(h1)
      outputs = Dense(10, activation='softmax')(h2)
      model = Model(inputs=inputs, outputs=outputs)
      model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
  
      # Data pre-processing
      X_train = X_train.reshape(60000, 784)
      X_test = X_test.reshape(10000, 784)
      X_train = X_train.astype('float32') / 255
      X_test = X_test.astype('float32') / 255
      y_train = to_categorical(y_train, num_classes=10)
      y_test = to_categorical(y_test, num_classes=10)
  
      # Fitting the model
      model.fit(X_train, y_train, validation_data=(X_test, y_test), epochs=5, batch_size=128)
      return model.summary()
output:     # Fitting the model
      model.fit(X_train, y_train, validation_data=(X_test, y_test), epochs=5, batch_size=128)
      return model.summary()