input: Write a function to visually summarize the Twitter data. The function should take a list of tweets as input, where each tweet is a dictionary containing fields like 'author', 'date', 'text', 'likes', and 'retweets'. The function should generate three bar charts using matplotlib: one summarizing the number of tweets per author, another showing the number of likes per tweet, and a third showing the number of retweets per tweet. The function should display these charts.
  
  def summarize_twitter_data(tweets):
      import matplotlib.pyplot as plt
  
      # Extract relevant data fields
      authors = [tweet['author'] for tweet in tweets]
      num_tweets = [authors.count(author) for author in set(authors)]
      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(list(set(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 summarize_twitter_data([{'author': 'Alice', 'date': '2023-01-01', 'text': 'Hello', 'likes': 10, 'retweets': 5}, {'author': 'Bob', 'date': '2023-01-02', 'text': 'Hi', 'likes': 5, 'retweets': 3}, {'author': 'Alice', 'date': '2023-01-03', 'text': 'Hola', 'likes': 7, 'retweets': 4}])
output: def summarize_twitter_data(tweets):
      import matplotlib.pyplot as plt
  
      # Extract relevant data fields
      authors = [tweet['author'] for tweet in tweets]
      num_tweets = [authors.count(author) for author in set(authors)]
      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(list(set(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()