input: Write a function to generate a machine learning model in Python using scikit-learn for classifying digits in the MNIST dataset. The function should load the dataset, split it into features and labels, reshape the features, create and fit a Logistic Regression classifier, and return the trained model.
  assert generate_mnist_model() is not None
  assert generate_mnist_model().predict([mnist.data[0]]) == np.array([mnist.target[0]])
  assert generate_mnist_model().score(X, y) > 0.9
output: def generate_mnist_model():
      from sklearn.datasets import fetch_openml
      from sklearn.model_selection import train_test_split
      from sklearn.linear_model import LogisticRegression
      from sklearn.preprocessing import StandardScaler
      import numpy as np
  
      mnist = fetch_openml('mnist_784', version=1)
      X, y = mnist.data, mnist.target
      X = X / 255.0
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
      scaler = StandardScaler()
      X_train = scaler.fit_transform(X_train)
      X_test = scaler.transform(X_test)
      model = LogisticRegression(max_iter=200)
      model.fit(X_train, y_train)
      return model