input: Write a function to visually summarize the Twitter data stream. The function should process the input data to extract relevant fields such as tweet author, date of tweet, text, number of likes, and number of retweets, and then plot summaries of these fields using matplotlib.
  
  import matplotlib.pyplot as plt
  
  def summarize_twitter_data(twitter_data):
      # Process the Twitter data to extract relevant data fields
      authors = []
      num_tweets = []
      num_likes = []
      num_retweets = []
      
      for tweet in twitter_data:
          authors.append(tweet['author'])
          num_tweets.append(1) # Each tweet represents 1 in the count
          num_likes.append(tweet['likes'])
          num_retweets.append(tweet['retweets'])
      
      # Plot the tweet authors
      plt.figure(1)
      plt.xlabel('Tweet Authors')
      plt.ylabel('Number of tweets')
      plt.title('Tweet Author Summary')
      plt.bar(authors, num_tweets)
      plt.show()
      
      # Plot the number of likes
      plt.figure(2)
      plt.xlabel('Tweets')
      plt.ylabel('Number of Likes')
      plt.title('Number of Likes Summary')
      plt.bar(range(len(twitter_data)), num_likes)
      plt.show()
      
      # Plot the number of retweets
      plt.figure(3)
      plt.xlabel('Tweets')
      plt.ylabel('Number of Retweets')
      plt.title('Number of Retweets Summary')
      plt.bar(range(len(twitter_data)), num_retweets)
      plt.show()
  
  assert summarize_twitter_data([{'author': 'User1', 'date': '2023-01-01', 'text': 'Hello', 'likes': 10, 'retweets': 2}, {'author': 'User2', 'date': '2023-01-02', 'text': 'Hi', 'likes': 5, 'retweets': 1}]) == None
output: def summarize_twitter_data(twitter_data):
      authors = []
      num_tweets = []
      num_likes = []
      num_retweets = []
      
      for tweet in twitter_data:
          authors.append(tweet['author'])
          num_tweets.append(1)
          num_likes.append(tweet['likes'])
          num_retweets.append(tweet['retweets'])
      
      plt.figure(1)
      plt.xlabel('Tweet Authors')
      plt.ylabel('Number of tweets')
      plt.title('Tweet Author Summary')
      plt.bar(authors, num_tweets)
      plt.show()
      
      plt.figure(2)
      plt.xlabel('Tweets')
      plt.ylabel('Number of Likes')
      plt.title('Number of Likes Summary')
      plt.bar(range(len(twitter_data)), num_likes)
      plt.show()
      
      plt.figure(3)
      plt.xlabel('Tweets')
      plt.ylabel('Number of Retweets')
      plt.title('Number of Retweets Summary')
      plt.bar(range(len(twitter_data)), num_retweets)
      plt.show()