input: 
  def classify_handwritten_digits():
      """ Generate a neural network model with TensorFlow for classifying hand-written digits 
      from the MNIST dataset. The model is a multilayer perceptron with 2 hidden layers, 
      each having 256 neurons. The network is trained using the Adam optimizer and 
      performs a softmax operation at the output layer to classify digits.
      
      >>> # Train the model
      >>> classify_handwritten_digits()
      Epoch: 0001 cost= 1.184521328
      Epoch: 0002 cost= 0.440017008
      ...
      Optimization Finished!
      Accuracy: 0.9238
      """
  
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 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 = models.Sequential()
      model.add(layers.Dense(256, activation='relu', input_shape=(28*28,)))
      model.add(layers.Dense(256, activation='relu'))
      model.add(layers.Dense(10, activation='softmax'))
  
      # Compile the model
      model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
  
      # Train the model
      model.fit(x_train, y_train, epochs=10, batch_size=128, validation_data=(x_test, y_test))
  
      # Evaluate the model
      test_loss, test_acc = model.evaluate(x_test, y_test)
      print(f'Accuracy: {test_acc:.4f}')
  