input: Write a function to visualize a summary of Twitter data by plotting the number of tweets per author, the number of likes per tweet, and the number of retweets per tweet. The input is a stream of tweets with fields like tweet author, date of tweet, text, number of likes, and number of retweets. The output should be three separate bar charts.
  assert visualize_twitter_data([
      {'author': 'User1', 'text': 'Hello world', 'likes': 5, 'retweets': 2},
      {'author': 'User2', 'text': 'Good morning', 'likes': 10, 'retweets': 3},
      {'author': 'User1', 'text': 'How are you?', 'likes': 3, 'retweets': 1}
  ])
output: def visualize_twitter_data(tweets):
      import matplotlib.pyplot as plt
      from collections import defaultdict
  
      authors = defaultdict(int)
      likes = []
      retweets = []
  
      for tweet in tweets:
          authors[tweet['author']] += 1
          likes.append(tweet['likes'])
          retweets.append(tweet['retweets'])
  
      plt.figure(figsize=(15, 5))
  
      plt.subplot(1, 3, 1)
      plt.bar(authors.keys(), authors.values())
      plt.title('Number of Tweets per Author')
      plt.xlabel('Author')
      plt.ylabel('Number of Tweets')
  
      plt.subplot(1, 3, 2)
      plt.bar(range(len(likes)), likes)
      plt.title('Number of Likes per Tweet')
      plt.xlabel('Tweet Index')
      plt.ylabel('Number of Likes')
  
      plt.subplot(1, 3, 3)
      plt.bar(range(len(retweets)), retweets)
      plt.title('Number of Retweets per Tweet')
      plt.xlabel('Tweet Index')
      plt.ylabel('Number of Retweets')
  
      plt.tight_layout()
      plt.show()