input: def generate_mnist_model(learning_rate: float, training_epochs: int, batch_size: int) -> dict:
      """ Generate a neural network model using TensorFlow to classify handwritten digits from the MNIST dataset.
      The model is a multilayer perceptron with two hidden layers, each having 256 neurons. It uses the Adam optimizer
      and softmax cross-entropy for loss calculation.
      >>> model_params = generate_mnist_model(0.001, 15, 100)
      >>> model_params['accuracy']
      0.9472
      """
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([
          layers.Dense(256, activation='relu', input_shape=(28 * 28,)),
          layers.Dense(256, activation='relu'),
          layers.Dense(10, activation='softmax')
      ])
  
      # Compile the model
      model.compile(optimizer=tf.keras.optimizers.Adam(learning_rate=learning_rate),
                    loss='categorical_crossentropy',
                    metrics=['accuracy'])
  
      # Train the model
      model.fit(x_train, y_train, epochs=training_epochs, batch_size=batch_size, validation_split=0.1)
  
      # Evaluate the model
      test_loss, test_accuracy = model.evaluate(x_test, y_test)
  
      # Return the model parameters
      return {
          'model': model,
          'accuracy': test_accuracy
      }