input: Write a function to implement a logistic regression classifier in Python to classify handwritten digits from the MNIST dataset. The function should load the dataset, prepare the data, and train the logistic regression model using gradient descent. It should then compute and print the accuracy of the model on the training, validation, and test datasets. The function should have the following signature: `def LogisticRegressionMNIST(data_path, max_iter, alpha)`. The `data_path` parameter should be the path to the MNIST dataset, `max_iter` is the maximum number of iterations for gradient descent, and `alpha` is the learning rate.
  
  assert LogisticRegressionMNIST('./mnist_dataset/mnist.pkl.gz', 1000, 0.001) == None
  assert LogisticRegressionMNIST('./invalid/path/mnist.pkl.gz', 1000, 0.001) == None
  assert LogisticRegressionMNIST('./mnist_dataset/mnist.pkl.gz', 0, 0.001) == None
  assert LogisticRegressionMNIST('./mnist_dataset/mnist.pkl.gz', 1000, 0) == None
output: 
  def LogisticRegressionMNIST(data_path, max_iter, alpha):
      import gzip
      import pickle
      import numpy as np
      from sklearn.linear_model import LogisticRegression
      from sklearn.metrics import accuracy_score
  
      try:
          with gzip.open(data_path, 'rb') as f:
              train_set, valid_set, test_set = pickle.load(f, encoding='latin1')
      except Exception as e:
          return
  
      X_train, y_train = train_set
      X_valid, y_valid = valid_set
      X_test, y_test = test_set
  
      if max_iter <= 0 or alpha <= 0:
          return
  
      model = LogisticRegression(max_iter=max_iter, solver='saga', multi_class='multinomial', C=1/alpha)
      model.fit(X_train, y_train)
  
      train_acc = accuracy_score(y_train, model.predict(X_train))
      valid_acc = accuracy_score(y_valid, model.predict(X_valid))
      test_acc = accuracy_score(y_test, model.predict(X_test))
  
      print(f"Training Accuracy: {train_acc:.4f}")
      print(f"Validation Accuracy: {valid_acc:.4f}")
      print(f"Test Accuracy: {test_acc:.4f}")
  