input: Write a python function to train a Naive Bayes classifier for text classification and make predictions.
  assert train_and_predict(["I had a great experience", "The customer support was horrible", "It was ok"], [1, 0, 2], ["I had a great time", "Their customer service was so bad"]) == [1, 0]
  assert train_and_predict(["The product is excellent", "Worst purchase ever", "I'm satisfied"], [1, 0, 1], ["Excellent product", "Worst service"]) == [1, 0]
  assert train_and_predict(["Love it", "Hate it", "It's fine"], [1, 0, 2], ["I absolutely love it", "I hate their service"]) == [1, 0]
output: def train_and_predict(train_texts, train_labels, test_texts):
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.naive_bayes import MultinomialNB
  
      # Convert text data to feature vectors
      vectorizer = CountVectorizer()
      X_train = vectorizer.fit_transform(train_texts)
      
      # Train the Naive Bayes classifier
      clf = MultinomialNB()
      clf.fit(X_train, train_labels)
      
      # Convert test texts to feature vectors
      X_test = vectorizer.transform(test_texts)
      
      # Make predictions
      predictions = clf.predict(X_test)
      
      return predictions.tolist()