input: Write a function to generate visual summaries of Twitter data, which includes plotting the number of tweets by each author, the number of likes for each tweet, and the number of retweets for each tweet. The function should take in a stream of tweets with fields like tweet author, date of tweet, text, number of likes, and number of retweets. Then, it should process the data to extract the relevant fields and plot the summaries using matplotlib.
  
  assert summarize_twitter_data([{"author": "Alice", "likes": 10, "retweets": 5}, {"author": "Bob", "likes": 20, "retweets": 10}, {"author": "Alice", "likes": 15, "retweets": 7}])
  
  # The function should generate three plots:
  # 1. A bar chart showing the number of tweets by each author.
  # 2. A bar chart showing the number of likes for each tweet.
  # 3. A bar chart showing the number of retweets for each tweet.
output: import matplotlib.pyplot as plt
  
  def summarize_twitter_data(tweets):
      authors = [tweet['author'] for tweet in tweets]
      likes = [tweet['likes'] for tweet in tweets]
      retweets = [tweet['retweets'] for tweet in tweets]
      
      author_counts = {}
      for author in authors:
          if author in author_counts:
              author_counts[author] += 1
          else:
              author_counts[author] = 1
      
      plt.figure(figsize=(15, 5))
      
      plt.subplot(1, 3, 1)
      plt.bar(author_counts.keys(), author_counts.values())
      plt.title('Number of Tweets by Each 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 for Each 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 for Each Tweet')
      plt.xlabel('Tweet Index')
      plt.ylabel('Number of Retweets')
      
      plt.tight_layout()
      plt.show()