input: Write a function to visually summarize the Twitter data. The function should process a stream of tweets with data fields like tweet author, date of tweet, text, number of likes, and number of retweets, and generate three bar plots: one summarizing the number of tweets per author, another summarizing the number of likes per tweet, and the third summarizing the number of retweets per tweet.
  
  def twitter_summary(tweets):
      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 tweets:
          if tweet['author'] not in authors:
              authors.append(tweet['author'])
              num_tweets.append(1)
          else:
              index = authors.index(tweet['author'])
              num_tweets[index] += 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 twitter_summary([{'author': 'User1', 'likes': 10, 'retweets': 5}, {'author': 'User2', 'likes': 15, 'retweets': 7}, {'author': 'User1', 'likes': 20, 'retweets': 10}])
output: def twitter_summary(tweets):
      import matplotlib.pyplot as plt
  
      authors = []
      num_tweets = []
      num_likes = []
      num_retweets = []
  
      for tweet in tweets:
          if tweet['author'] not in authors:
              authors.append(tweet['author'])
              num_tweets.append(1)
          else:
              index = authors.index(tweet['author'])
              num_tweets[index] += 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()