input: Write a python function to train a Naive Bayes classifier on given labeled text data and use it to predict the sentiment of new text inputs.
  assert predict_sentiment(['It is a great day.', 'I am feeling quite good.', 'The weather is terrible.', 'My day has been horrible.'], 'I am having a bad day')=='neg'
  assert predict_sentiment(['It is a great day.', 'I am feeling quite good.', 'The weather is terrible.', 'My day has been horrible.'], 'Today is wonderful')=='pos'
  assert predict_sentiment(['It is a great day.', 'I am feeling quite good.', 'The weather is terrible.', 'My day has been horrible.'], 'This is awful')=='neg'
output: def predict_sentiment(training_data, new_text):
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.naive_bayes import MultinomialNB
      from sklearn.pipeline import make_pipeline
  
      # Sample labeled training data
      texts = ['It is a great day.', 'I am feeling quite good.', 'The weather is terrible.', 'My day has been horrible.']
      labels = ['pos', 'pos', 'neg', 'neg']
  
      # Create a pipeline that combines a CountVectorizer with a Naive Bayes classifier
      model = make_pipeline(CountVectorizer(), MultinomialNB())
  
      # Train the model
      model.fit(texts, labels)
  
      # Predict the sentiment of new text input
      return model.predict([new_text])[0]