input: Write a function to visually summarize the Twitter data. The function should process the Twitter data and generate three bar plots: one summarizing the number of tweets per author, one summarizing the number of likes per tweet, and one summarizing the number of retweets per tweet. The function should use matplotlib for plotting. If the Twitter data is empty, the function should return a message indicating no data to plot.
  import matplotlib.pyplot as plt
  
  def summarize_twitter_data(twitter_data):
      if not twitter_data:
          return "No data to plot"
      
      authors = [tweet['author'] for tweet in twitter_data]
      num_tweets = [authors.count(author) for author in set(authors)]
      
      num_likes = [tweet['likes'] for tweet in twitter_data]
      num_retweets = [tweet['retweets'] for tweet in twitter_data]
      
      # Plot the tweet authors
      plt.figure(1)
      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.figure(2)
      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.figure(3)
      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([]) == "No data to plot"
  assert summarize_twitter_data([{'author': 'user1', 'likes': 10, 'retweets': 5}, {'author': 'user2', 'likes': 20, 'retweets': 10}, {'author': 'user1', 'likes': 15, 'retweets': 7}])
  assert summarize_twitter_data([{'author': 'user1', 'likes': 10, 'retweets': 5}, {'author': 'user1', 'likes': 15, 'retweets': 7}])
output: 
  def summarize_twitter_data(twitter_data):
      if not twitter_data:
          return "No data to plot"
      
      authors = [tweet['author'] for tweet in twitter_data]
      num_tweets = [authors.count(author) for author in set(authors)]
      
      num_likes = [tweet['likes'] for tweet in twitter_data]
      num_retweets = [tweet['retweets'] for tweet in twitter_data]
      
      # Plot the tweet authors
      plt.figure(1)
      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.figure(2)
      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.figure(3)
      plt.xlabel('Tweets')
      plt.ylabel('Number of Retweets')
      plt.title('Number of Retweets Summary')
      plt.bar(range(len(twitter_data)), num_retweets)
      plt.show()
  