input: Write a function that generates a machine learning model using scikit-learn for classifying digits in the MNIST dataset. The function should load the dataset, split it into features and labels, create a Logistic Regression classifier, and fit the model to the data. The function should return the fitted classifier.
  
  
  def generate_mnist_classifier():
      from sklearn.datasets import fetch_openml
      import numpy as np
      from sklearn.linear_model import LogisticRegression
      
      # Load the dataset
      mnist = fetch_openml('mnist_784')
      
      # Split into features and labels
      X = mnist.data
      y = mnist.target
      
      # Reshape data to be valid
      X = X.reshape((X.shape[0], -1))
      
      # Create a Logistic Regression classifier
      clf = LogisticRegression()
      
      # Fit the model to the data
      clf.fit(X, y)
      
      return clf
  
  assert isinstance(generate_mnist_classifier(), LogisticRegression)
  assert generate_mnist_classifier().predict([X[0]]) == y[0]
  
output: def generate_mnist_classifier():
      from sklearn.datasets import fetch_openml
      import numpy as np
      from sklearn.linear_model import LogisticRegression
      
      # Load the dataset
      mnist = fetch_openml('mnist_784')
      
      # Split into features and labels
      X = mnist.data
      y = mnist.target
      
      # Reshape data to be valid
      X = X.reshape((X.shape[0], -1))
      
      # Create a Logistic Regression classifier
      clf = LogisticRegression()
      
      # Fit the model to the data
      clf.fit(X, y)
      
      return clf