input: Write a function to visualize the summary of Twitter data, which includes tweet authors, number of likes, and number of retweets. The function should take a stream of tweets as input and plot three separate bar charts for these categories.
  
  
  def summarize_twitter_data(tweets):
      import matplotlib.pyplot as plt
      
      # Extract relevant data fields
      authors = [tweet['author'] for tweet in tweets]
      num_likes = [tweet['likes'] for tweet in tweets]
      num_retweets = [tweet['retweets'] for tweet in tweets]
      
      # Plot the tweet authors
      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.xlabel('Tweets')
      plt.ylabel('Number of Likes')
      plt.title('Number of Likes Summary')
      plt.bar(tweets, num_likes)
      plt.show()
      
      # Plot the number of retweets
      plt.xlabel('Tweets')
      plt.ylabel('Number of Retweets')
      plt.title('Number of Retweets Summary')
      plt.bar(tweets, num_retweets)
      plt.show()
  
  # Example test case
  tweets = [
      {'author': 'User1', 'date': '2023-01-01', 'text': 'Hello', 'likes': 10, 'retweets': 5},
      {'author': 'User2', 'date': '2023-01-02', 'text': 'World', 'likes': 20, 'retweets': 15}
  ]
  
  summarize_twitter_data(tweets)
  
output: def summarize_twitter_data(tweets):
      import matplotlib.pyplot as plt
      
      # Extract relevant data fields
      authors = [tweet['author'] for tweet in tweets]
      num_likes = [tweet['likes'] for tweet in tweets]
      num_retweets = [tweet['retweets'] for tweet in tweets]
      
      # Plot the tweet authors
      plt.figure(1)
      plt.xlabel('Tweet Authors')
      plt.ylabel('Number of tweets')
      plt.title('Tweet Author Summary')
      plt.bar(authors, [1]*len(authors))
      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(tweets)), 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(tweets)), num_retweets)
      plt.show()