input: Write a function to create a neural network model in TensorFlow for classifying hand-written digits from the MNIST dataset. The function should initialize the model parameters, build the model structure, train the model, and finally evaluate its accuracy on the test dataset. If the dataset is not available, the function should provide a message indicating the need to download the MNIST dataset.
  
  def mnist_classifier():
      try:
          import tensorflow as tf
          from tensorflow.examples.tutorials.mnist import input_data
          mnist = input_data.read_data_sets("/tmp/data", one_hot=True)
      except Exception as e:
          return "Please ensure the MNIST dataset is available or download it."
      
      learning_rate = 0.001
      training_epochs = 15
      batch_size = 100
      display_step = 1
      
      n_hidden_1 = 256
      n_hidden_2 = 256
      n_input = 784
      n_classes = 10
      
      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 multilayer_perceptron(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 = multilayer_perceptron(X)
      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)
      init = tf.global_variables_initializer()
      
      with tf.Session() as model:
          model.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 = model.run([train_op, loss_op], feed_dict={X: batch_x, Y: batch_y})
                  avg_cost += c / total_batch
              if epoch % display_step == 0:
                  print("Epoch:", '%04d' % (epoch+1), "cost=", "{:.9f}".format(avg_cost))
          print("Optimization Finished!")
          
          pred = tf.nn.softmax(logits)
          correct_prediction = tf.equal(tf.argmax(pred, 1), tf.argmax(Y, 1))
          accuracy = tf.reduce_mean(tf.cast(correct_prediction, "float"))
          acc = accuracy.eval({X: mnist.test.images, Y: mnist.test.labels})
          print("Accuracy:", acc)
          return acc
  
  assert mnist_classifier() > 0.9
  assert mnist_classifier() != "Please ensure the MNIST dataset is available or download it."
output: def mnist_classifier():
      try:
          import tensorflow as tf
          from tensorflow.examples.tutorials.mnist import input_data
          mnist = input_data.read_data_sets("/tmp/data", one_hot=True)
      except Exception as e:
          return "Please ensure the MNIST dataset is available or download it."
      
      learning_rate = 0.001
      training_epochs = 15
      batch_size = 100
      display_step = 1
      
      n_hidden_1 = 256
      n_hidden_2 = 256
      n_input = 784
      n_classes = 10
      
      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 multilayer_perceptron(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 = multilayer_perceptron(X)
      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)
      init = tf.global_variables_initializer()
      
      with tf.Session() as model:
          model.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 = model.run([train_op, loss_op], feed_dict={X: batch_x, Y: batch_y})
                  avg_cost += c / total_batch
              if epoch % display_step == 0:
                  print("Epoch:", '%04d' % (epoch+1), "cost=", "{:.9f}".format(avg_cost))
          print("Optimization Finished!")
          
          pred = tf.nn.softmax(logits)
          correct_prediction = tf.equal(tf.argmax(pred, 1), tf.argmax(Y, 1))
          accuracy = tf.reduce_mean(tf.cast(correct_prediction, "float"))
          acc = accuracy.eval({X: mnist.test.images, Y: mnist.test.labels})
          print("Accuracy:", acc)
          return acc