input: Write a function to implement a naive bayes classifier using python to classify emails as spam or not spam. The function should create a GaussianNB classifier, train it using the training sets, and then predict the output for the test sets. It should take training data (X_train and y_train) and testing data (X_test) as inputs and return the predicted output.
  assert naive_bayes_classifier([[1, 2], [3, 4]], [0, 1], [[1, 1]])==[0]
  assert naive_bayes_classifier([[1, 2], [3, 4], [5, 6]], [0, 1, 1], [[1, 1], [5, 6]])==[0, 1]
  assert naive_bayes_classifier([], [], [[1, 1]])==[]
  assert naive_bayes_classifier([[1, 2], [3, 4]], [0, 1], [])==[]
output: def naive_bayes_classifier(X_train, y_train, X_test):
      if not X_train or not X_test:
          return []
      from sklearn.naive_bayes import GaussianNB
      classifier = GaussianNB()
      classifier.fit(X_train, y_train)
      return classifier.predict(X_test).tolist()