input: Write a function to classify hand-written digits from the MNIST dataset using a neural network model with TensorFlow and Python. If the classification is successful, return the accuracy as a float. If the dataset cannot be loaded or the model fails to train, return "Error".
  assert classify_mnist()[0] == "Accuracy"
  assert isinstance(float(classify_mnist()[1]), float)
  assert classify_mnist()[1] >= 0.90
  assert classify_mnist_with_error() == "Error"
output: def classify_mnist():
      try:
          import tensorflow as tf
          from tensorflow.keras.datasets import mnist
          from tensorflow.keras.models import Sequential
          from tensorflow.keras.layers import Dense, Flatten
          from tensorflow.keras.utils import to_categorical
  
          (x_train, y_train), (x_test, y_test) = mnist.load_data()
          x_train = x_train / 255.0
          x_test = x_test / 255.0
          y_train = to_categorical(y_train, 10)
          y_test = to_categorical(y_test, 10)
  
          model = Sequential([
              Flatten(input_shape=(28, 28)),
              Dense(128, activation='relu'),
              Dense(10, activation='softmax')
          ])
  
          model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
          model.fit(x_train, y_train, epochs=5, batch_size=32, verbose=0)
  
          _, accuracy = model.evaluate(x_test, y_test, verbose=0)
          return "Accuracy", accuracy
      except:
          return "Error"