input: def recognize_handwritten_digits(X_train, y_train, X_test, y_test):
      """
      This function creates and trains a machine learning model to recognize handwritten digits (0-9) using a neural network.
      The function takes in training and testing data, preprocesses them, builds a neural network model using Keras, and then fits the model to the data.
      The model has an input layer, a hidden layer with 64 neurons and a dropout of 0.5, and an output layer with 10 neurons corresponding to the 10 digits.
      
      >>> (X_train, y_train), (X_test, y_test) = mnist.load_data()
      >>> model = recognize_handwritten_digits(X_train, y_train, X_test, y_test)
      """
      # Importing necessary libraries
      import numpy as np
      import pandas as pd
      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
  
      # Data pre-processing
  
      # Reshape inputs from (60000, 28, 28) to (60000, 784)
      X_train = X_train.reshape(60000, 784)
      X_test = X_test.reshape(10000, 784)
  
      # Normalize pixel values
      X_train = X_train.astype('float32')
      X_train /= 255
      X_test = X_test.astype('float32')
      X_test /= 255
  
      # One-hot encode labels
      y_train = to_categorical(y_train, num_classes=10)
      y_test = to_categorical(y_test, num_classes=10)
  
      # Defining the neural network model
  
      # Input layer
      inputs = Input(shape=(784,))
  
      # Hidden layer
      h1 = Dense(64, activation='relu')(inputs)
      h2 = Dropout(0.5)(h1)
  
      # Output layer
      outputs = Dense(10, activation='softmax')(h2)
  
      # Compiling the model
      model = Model(inputs=inputs, outputs=outputs)
      model.compile(loss='categorical_crossentropy',
                    optimizer='adam',
                    metrics=['accuracy'])
  
      # Fitting the model
      model.fit(X_train, y_train, validation_data=(X_test, y_test), epochs=5, batch_size=128)
  
      return model
output:     # Evaluating the model
      score = model.evaluate(X_test, y_test, verbose=0)
      print(f'Test loss: {score[0]}')
      print(f'Test accuracy: {score[1]}')