input: 
  def recognize_handwritten_digits() -> Model:
      """ Given a dataset of handwritten digits (0-9) from MNIST, build and train a 
      Machine Learning model using a neural network to recognize and classify these digits.
      The model should consist of an input layer, a hidden layer, and an output layer. 
      The input layer should have a shape of 28x28, the hidden layer should have 64 neurons 
      with ReLU activation, followed by a dropout layer with a rate of 0.5. The output 
      layer should have 10 neurons with softmax activation to classify the 10 digits.
      The model should be compiled with categorical cross-entropy loss, Adam optimizer, 
      and accuracy as the metric. The model should be trained for 5 epochs with a batch 
      size of 128. 
      Example:
      After training, the model should be able to predict the handwritten digits with 
      a high accuracy, given that the input data is preprocessed and normalized. 
      >>> model = recognize_handwritten_digits()
      >>> model.evaluate(X_test, y_test)
      0.9756
      """
  
output:     
      from tensorflow.keras.datasets import mnist
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Dense, Dropout, Flatten
      from tensorflow.keras.utils import to_categorical
      from tensorflow.keras.optimizers import Adam
  
      # Load and preprocess the MNIST dataset
      (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)
  
      # Build the model
      model = Sequential()
      model.add(Dense(64, activation='relu', input_shape=(28 * 28,)))
      model.add(Dropout(0.5))
      model.add(Dense(10, activation='softmax'))
  
      # Compile the model
      model.compile(loss='categorical_crossentropy', optimizer=Adam(), metrics=['accuracy'])
  
      # Train the model
      model.fit(X_train, y_train, epochs=5, batch_size=128, validation_data=(X_test, y_test))
  
      return model
  