input: Write a python function to build and train a simple CNN model on the MNIST dataset.
  assert isinstance(model, keras.models.Sequential)
  assert model.input_shape == (None, 28, 28, 1)
  assert model.output_shape == (None, 10)
  assert score[1] >= 0.9
output: def build_and_train_cnn_model():
      import tensorflow as tf
      from tensorflow import keras
      from tensorflow.keras import layers, models
  
      # Load the MNIST dataset
      (x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
      x_train = x_train.reshape((x_train.shape[0], 28, 28, 1)).astype('float32') / 255
      x_test = x_test.reshape((x_test.shape[0], 28, 28, 1)).astype('float32') / 255
  
      # Build the CNN model
      model = models.Sequential([
          layers.Conv2D(32, (3, 3), activation='relu', input_shape=(28, 28, 1)),
          layers.MaxPooling2D((2, 2)),
          layers.Conv2D(64, (3, 3), activation='relu'),
          layers.MaxPooling2D((2, 2)),
          layers.Conv2D(64, (3, 3), activation='relu'),
          layers.Flatten(),
          layers.Dense(64, activation='relu'),
          layers.Dense(10, activation='softmax')
      ])
  
      # Compile the model
      model.compile(optimizer='adam',
                    loss='sparse_categorical_crossentropy',
                    metrics=['accuracy'])
  
      # Train the model
      model.fit(x_train, y_train, epochs=5, batch_size=64, validation_split=0.2)
  
      # Evaluate the model
      score = model.evaluate(x_test, y_test)
  
      return model, score