input: Write a python function to load and preprocess the MNIST dataset.
  assert X_train.shape == (60000, 28, 28, 1)
  assert X_test.shape == (10000, 28, 28, 1)
  assert X_train.max() <= 1.0
  assert X_test.max() <= 1.0
output: def load_and_preprocess_mnist():
      from tensorflow.keras.datasets import mnist
      import numpy as np
  
      # Load the dataset
      (X_train, y_train), (X_test, y_test) = mnist.load_data()
  
      # Reshape the data to add a single channel dimension
      X_train = X_train.reshape((X_train.shape[0], 28, 28, 1))
      X_test = X_test.reshape((X_test.shape[0], 28, 28, 1))
  
      # Normalize the data to the range [0, 1]
      X_train = X_train.astype('float32') / 255.0
      X_test = X_test.astype('float32') / 255.0
  
      return X_train, X_test
  
  # Uncomment below lines to test the function
  # X_train, X_test = load_and_preprocess_mnist()
  # assert X_train.shape == (60000, 28, 28, 1)
  # assert X_test.shape == (10000, 28, 28, 1)
  # assert X_train.max() <= 1.0
  # assert X_test.max() <= 1.0