input: Write a function to construct a naive bayes classifier for spam email classification using Python and the sklearn library. The function should be able to train the model using provided training data and predict whether the emails in a test set are spam or not.
  
  from sklearn.naive_bayes import GaussianNB
  
  def spam_classifier(X_train, y_train, X_test):
      # Create a Gaussian Classifier
      model = GaussianNB()
      
      # Train the model using the training sets 
      model.fit(X_train, y_train)
      
      # Predict Output 
      y_pred = model.predict(X_test)
      
      return y_pred
  
  assert (spam_classifier(X_train_data, y_train_data, X_test_data) == ['not spam', 'spam', 'spam']).all()
  assert (spam_classifier(X_train_data_empty, y_train_data_empty, X_test_data_empty) == []).all()
  assert (spam_classifier(X_train_data_single, y_train_data_single, X_test_data_single) == ['not spam']).all()
  assert (spam_classifier(X_train_data_large, y_train_data_large, X_test_data_large) == ['not spam', 'spam', 'spam', 'not spam', 'spam']).all()
  assert (spam_classifier(X_train_data_mixed, y_train_data_mixed, X_test_data_mixed) == ['not spam', 'spam', 'not spam', 'spam', 'not spam']).all()
output: 
  def spam_classifier(X_train, y_train, X_test):
      model = GaussianNB()
      model.fit(X_train, y_train)
      y_pred = model.predict(X_test)
      return y_pred
  