input: Write a function to analyze the sentiment of given text and categorize it into positive, negative, and neutral sentiments.
  
  
  import nltk
  from nltk.tokenize import sent_tokenize
  from nltk.classify import NaiveBayesClassifier
  
  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
  
  # End analyze sentiment definition
  
  
  Assert the following examples:
  
  
  assert analyze_sentiment("I love this product") == "positive"
  assert analyze_sentiment("I hate this product") == "negative"
  assert analyze_sentiment("This is just okay") == "neutral"
  assert analyze_sentiment("") == "neutral"
  assert analyze_sentiment("This is amazing and fantastic") == "positive"
  assert analyze_sentiment("This is terrible and awful") == "negative"
  assert analyze_sentiment("I feel indifferent about it") == "neutral"
  assert analyze_sentiment("The weather today is nice") == "positive"
  assert analyze_sentiment("The weather today is terrible") == "negative"
  
output: 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