input: Write a function to visually summarize the Twitter data by processing the stream of tweets and plotting the tweet authors, number of likes, and number of retweets.
  def visualize_twitter_data(tweets):
      import matplotlib.pyplot as plt
      # Extract relevant data fields from the tweets
      authors = []
      num_tweets = []
      num_likes = []
      num_retweets = []
      
      for tweet in tweets:
          authors.append(tweet['author'])
          num_tweets.append(1)  # Count each tweet as 1
          num_likes.append(tweet['likes'])
          num_retweets.append(tweet['retweets'])
      
      # 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(range(len(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(range(len(tweets)), num_retweets)
      plt.show()
  
  assert visualize_twitter_data([{'author': 'Alice', 'likes': 5, 'retweets': 2}, {'author': 'Bob', 'likes': 3, 'retweets': 1}])==None
  assert visualize_twitter_data([])==None
output: def visualize_twitter_data(tweets):
      import matplotlib.pyplot as plt
      authors = []
      num_tweets = []
      num_likes = []
      num_retweets = []
      
      for tweet in tweets:
          authors.append(tweet['author'])
          num_tweets.append(1)
          num_likes.append(tweet['likes'])
          num_retweets.append(tweet['retweets'])
      
      plt.xlabel('Tweet Authors')
      plt.ylabel('Number of tweets')
      plt.title('Tweet Author Summary')
      plt.bar(authors, num_tweets)
      plt.show()
  
      plt.xlabel('Tweets')
      plt.ylabel('Number of Likes')
      plt.title('Number of Likes Summary')
      plt.bar(range(len(tweets)), num_likes)
      plt.show()
  
      plt.xlabel('Tweets')
      plt.ylabel('Number of Retweets')
      plt.title('Number of Retweets Summary')
      plt.bar(range(len(tweets)), num_retweets)
      plt.show()