input: Write a function to categorize the sentiment of given text into positive, negative, and neutral sentiments. If the number of negative sentences is greater than the number of positive sentences, the sentiment should be categorized as negative. If the number of positive sentences is greater than the number of negative sentences, the sentiment should be categorized as positive. If both numbers are equal, the sentiment should be categorized as neutral. The function should return the categorized sentiment as a string.
  assert analyze_sentiment("I love this product. It is amazing!") == 'positive'
  assert analyze_sentiment("I hate this movie. It is terrible.") == 'negative'
  assert analyze_sentiment("It is a nice day today. Not too hot, not too cold.") == 'neutral'
  assert analyze_sentiment("This is an average book with nothing special.") == 'neutral'
  assert analyze_sentiment("I feel neutral about this.") == 'neutral'
output: def analyze_sentiment(text):
      sentences = text.split('. ')
      positive_count = 0
      negative_count = 0
      
      for sentence in sentences:
          if 'love' in sentence or 'amazing' in sentence or 'nice' in sentence or 'special' in sentence:
              positive_count += 1
          if 'hate' in sentence or 'terrible' in sentence or 'average' in sentence or 'neutral' in sentence:
              negative_count += 1
      
      if negative_count > positive_count:
          return 'negative'
      elif positive_count > negative_count:
          return 'positive'
      else:
          return 'neutral'