input: Write a function to analyze the sentiment of given text and categorize it into positive, negative, and neutral sentiments. If the text contains more negative sentences, return 'negative'; if it contains more positive sentences, return 'positive'; otherwise, return 'neutral'. If the given text is empty, return 'neutral'.
  assert analyze_sentiment("I love this product. It works great!") == 'positive'
  assert analyze_sentiment("I hate this product. It is terrible!") == 'negative'
  assert analyze_sentiment("This is just okay.") == 'neutral'
  assert analyze_sentiment("") == 'neutral'
output: def analyze_sentiment(text):
      if not text:
          return 'neutral'
      
      sentences = text.split('.')
      positive_count = 0
      negative_count = 0
      
      for sentence in sentences:
          sentence = sentence.strip()
          if 'love' in sentence or 'great' in sentence or 'positive' in sentence:
              positive_count += 1
          elif 'hate' in sentence or 'terrible' in sentence or 'negative' in sentence:
              negative_count += 1
      
      if positive_count > negative_count:
          return 'positive'
      elif negative_count > positive_count:
          return 'negative'
      else:
          return 'neutral'