input: Write a function to analyze the sentiment of given text and categorize it into positive, negative, and neutral sentiments. If the frequency of negative sentiments is higher than positive sentiments in the text, return 'negative'. If the frequency of positive sentiments is higher than negative sentiments, return 'positive'. If both frequencies are equal, return 'neutral'.
  assert analyze_sentiment("I love this product. It makes my life so much better.")=='positive'
  assert analyze_sentiment("I hate this product. It makes my life miserable.")=='negative'
  assert analyze_sentiment("This product is okay but has some flaws.")=='neutral'
  assert analyze_sentiment("")=='neutral'
  assert analyze_sentiment("I am feeling good today, but yesterday was not so good.")=='neutral'
output: def analyze_sentiment(text):
      positive_words = ['love', 'better', 'good', 'great', 'happy']
      negative_words = ['hate', 'miserable', 'bad', 'awful', 'terrible']
      
      positive_count = sum(text.lower().count(word) for word in positive_words)
      negative_count = sum(text.lower().count(word) for word in negative_words)
      
      if negative_count > positive_count:
          return 'negative'
      elif positive_count > negative_count:
          return 'positive'
      else:
          return 'neutral'