input: def classify_handwritten_digits(session, mnist, learning_rate: float, training_epochs: int, batch_size: int, display_step: int) -> float:
      """Train a neural network model to classify handwritten digits from the MNIST dataset.
      Return the accuracy of the model on the test set.
      >>> classify_handwritten_digits(tf.Session(), input_data.read_data_sets("/tmp/data", one_hot=True), 0.001, 15, 100, 1)
      0.95
      """
output:     import tensorflow as tf
      from tensorflow.examples.tutorials.mnist import input_data
  
      # Parameters
      n_input = 784  # MNIST data input (img shape: 28*28)
      n_classes = 10  # MNIST total classes (0-9 digits)
  
      # tf Graph input
      x = tf.placeholder(tf.float32, [None, n_input])
      y = tf.placeholder(tf.float32, [None, n_classes])
  
      # Set model weights
      W = tf.Variable(tf.zeros([n_input, n_classes]))
      b = tf.Variable(tf.zeros([n_classes]))
  
      # Construct model
      pred = tf.nn.softmax(tf.matmul(x, W) + b)  # Softmax
  
      # Minimize error using cross entropy
      cost = tf.reduce_mean(-tf.reduce_sum(y * tf.log(pred), reduction_indices=1))
      optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost)
  
      # Initializing the variables
      init = tf.global_variables_initializer()
  
      # Launch the graph
      session.run(init)
  
      # Training cycle
      for epoch in range(training_epochs):
          avg_cost = 0.
          total_batch = int(mnist.train.num_examples / batch_size)
          # Loop over all batches
          for i in range(total_batch):
              batch_xs, batch_ys = mnist.train.next_batch(batch_size)
              # Run optimization op (backprop) and cost op (to get loss value)
              _, c = session.run([optimizer, cost], feed_dict={x: batch_xs, y: batch_ys})
              # Compute average loss
              avg_cost += c / total_batch
          # Display logs per epoch step
          if (epoch + 1) % display_step == 0:
              print(f"Epoch: {epoch+1}, Cost: {avg_cost}")
  
      print("Optimization Finished!")
  
      # Test model
      correct_prediction = tf.equal(tf.argmax(pred, 1), tf.argmax(y, 1))
      # Calculate accuracy
      accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
      return session.run(accuracy, feed_dict={x: mnist.test.images, y: mnist.test.labels})