input: Write a function to categorize the sentiment of given text into positive, negative, or neutral by analyzing each sentence using a NaiveBayesClassifier. If the majority of the sentences are classified as negative, return 'negative'; if the majority are positive, return 'positive'; otherwise, return 'neutral'. If the input text is empty, return 'neutral'.
  
  def analyze_sentiment(text):
      sents = sent_tokenize(text)
      neg = 0
      pos = 0
      for sentence in sents:
          sentiment_analysis = NaiveBayesClassifier.classify(sentence)
          if sentiment_analysis == 'neg':
              neg += 1
          if sentiment_analysis == 'pos':
              pos += 1
      
      if neg > pos:
          sentiment = 'negative'
      elif pos > neg:
          sentiment = 'positive'
      else:
          sentiment = 'neutral'
      
      return sentiment
  
  assert analyze_sentiment("I love this product! It's amazing.")=='positive'
  assert analyze_sentiment("I hate this product! It's terrible.")=='negative'
  assert analyze_sentiment("It's just an okay product.")=='neutral'
  assert analyze_sentiment("")=='neutral'
output: def analyze_sentiment(text):
      if not text:
          return 'neutral'
      
      sents = sent_tokenize(text)
      neg = 0
      pos = 0
      for sentence in sents:
          sentiment_analysis = NaiveBayesClassifier.classify(sentence)
          if sentiment_analysis == 'neg':
              neg += 1
          elif sentiment_analysis == 'pos':
              pos += 1
      
      if neg > pos:
          return 'negative'
      elif pos > neg:
          return 'positive'
      else:
          return 'neutral'