input: Write a function to analyze the sentiment of given text. The program should categorize the text into positive, negative, and neutral sentiments. Use the NaiveBayesClassifier from the nltk library to classify each sentence, and return the overall sentiment based on the counts of positive and negative sentences. If the given 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!")=='positive'
  assert analyze_sentiment("I hate this product so much.")=='negative'
  assert analyze_sentiment("This product is OK.")=='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:
          sentiment = 'negative'
      elif pos > neg:
          sentiment = 'positive'
      else:
          sentiment = 'neutral'
      
      return sentiment