input: 
  def train_mnist_model(learning_rate: float, training_epochs: int, batch_size: int, display_step: int, n_hidden_1: int, n_hidden_2: int, n_input: int, n_classes: int) -> tf.Tensor:
      """ Trains a neural network model using TensorFlow for classifying hand-written digits from the MNIST dataset.
      The function initializes the dataset, defines the neural network architecture, trains the model, and 
      evaluates its accuracy.
      >>> train_mnist_model(0.001, 15, 100, 1, 256, 256, 784, 10)
      <tf.Tensor 'Softmax:0' shape=(?, 10) dtype=float32>
      """
  
output:     
      import tensorflow as tf
      from tensorflow.examples.tutorials.mnist import input_data
  
      mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
  
      X = tf.placeholder("float", [None, n_input])
      Y = tf.placeholder("float", [None, n_classes])
  
      weights = {
          'h1': tf.Variable(tf.random_normal([n_input, n_hidden_1])),
          'h2': tf.Variable(tf.random_normal([n_hidden_1, n_hidden_2])),
          'out': tf.Variable(tf.random_normal([n_hidden_2, n_classes]))
      }
      biases = {
          'b1': tf.Variable(tf.random_normal([n_hidden_1])),
          'b2': tf.Variable(tf.random_normal([n_hidden_2])),
          'out': tf.Variable(tf.random_normal([n_classes]))
      }
  
      def neural_net(x):
          layer_1 = tf.add(tf.matmul(x, weights['h1']), biases['b1'])
          layer_2 = tf.add(tf.matmul(layer_1, weights['h2']), biases['b2'])
          out_layer = tf.matmul(layer_2, weights['out']) + biases['out']
          return out_layer
  
      logits = neural_net(X)
      prediction = tf.nn.softmax(logits)
  
      loss_op = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(
          logits=logits, labels=Y))
      optimizer = tf.train.AdamOptimizer(learning_rate=learning_rate)
      train_op = optimizer.minimize(loss_op)
  
      correct_pred = tf.equal(tf.argmax(prediction, 1), tf.argmax(Y, 1))
      accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))
  
      init = tf.global_variables_initializer()
  
      with tf.Session() as sess:
          sess.run(init)
  
          for epoch in range(training_epochs):
              avg_cost = 0.
              total_batch = int(mnist.train.num_examples/batch_size)
              for i in range(total_batch):
                  batch_x, batch_y = mnist.train.next_batch(batch_size)
                  _, c = sess.run([train_op, loss_op], feed_dict={X: batch_x, Y: batch_y})
                  avg_cost += c / total_batch
              if epoch % display_step == 0:
                  print(f"Epoch: {epoch+1}, Cost: {avg_cost}")
  
          print("Optimization Finished!")
  
          print("Testing Accuracy:", 
                sess.run(accuracy, feed_dict={X: mnist.test.images, Y: mnist.test.labels}))
  
          return prediction
  