input: Write a function to visually summarize the Twitter data using matplotlib. The function should process the Twitter data to extract relevant data fields like tweet author, number of tweets, number of likes, and number of retweets. It should then create three bar plots: one for the number of tweets per author, one for the number of likes per tweet, and one for the number of retweets per tweet. The function should take the Twitter data as input and show the plots as output.
  
  def summarize_twitter_data(twitter_data):
      import matplotlib.pyplot as plt
      
      # Process the Twitter data to extract the 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 counts as one
          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(twitter_data)), 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(twitter_data)), num_retweets)
      plt.show()
  
  assert summarize_twitter_data([{'author': 'User1', 'likes': 10, 'retweets': 5}, {'author': 'User2', 'likes': 15, 'retweets': 7}])
  assert summarize_twitter_data([{'author': 'User3', 'likes': 3, 'retweets': 1}, {'author': 'User3', 'likes': 4, 'retweets': 2}])
output: def summarize_twitter_data(twitter_data):
      import matplotlib.pyplot as plt
      
      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.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(twitter_data)), num_likes)
      plt.show()
  
      plt.xlabel('Tweets')
      plt.ylabel('Number of Retweets')
      plt.title('Number of Retweets Summary')
      plt.bar(range(len(twitter_data)), num_retweets)
      plt.show()