input: def generate_neural_network(learning_rate: float, training_epochs: int, batch_size: int, display_step: int) -> str:
      """Generate a neural network model with TensorFlow and Python for classifying hand-written digits from the MNIST dataset.
      The function will train the model and return a string indicating the completion of the optimization process and the accuracy of the model.
      
      >>> generate_neural_network(0.001, 15, 100, 1)
      "Optimization Finished!\nAccuracy: 0.945"
      """
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 neural network model
      model = models.Sequential([
          layers.Dense(512, activation='relu', input_shape=(28*28,)),
          layers.Dropout(0.2),
          layers.Dense(512, activation='relu'),
          layers.Dropout(0.2),
          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, verbose=0, validation_data=(x_test, y_test))
  
      # Evaluate the model
      _, accuracy = model.evaluate(x_test, y_test, verbose=0)
  
      return f"Optimization Finished!\nAccuracy: {accuracy:.3f}"