input: Write a Python function to generate 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, and then train a LogisticRegression model on the data. Ensure the data is reshaped appropriately before modeling. The function should print the shape of the features and labels before fitting the model.
  
  
  from sklearn.datasets import fetch_openml
  import numpy as np
  from sklearn.linear_model import LogisticRegression
  
  def mnist_digit_classifier():
      # 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))
      print(X.shape, y.shape)
  
      # Create a Logistic Regression classifier
      clf = LogisticRegression()
  
      # Fit the model to the data
      clf.fit(X, y)
  
  mnist_digit_classifier()
  
output: def mnist_digit_classifier():
      mnist = fetch_openml('mnist_784')
      X = mnist.data
      y = mnist.target
      X = X.reshape((X.shape[0], -1))
      print(X.shape, y.shape)
      clf = LogisticRegression()
      clf.fit(X, y)