input: Write a function to get the most recent tweets from a specified Twitter user using the Tweepy library. The function should authenticate to Twitter using OAuth and then retrieve the tweets. If the retrieval is successful, it should print each tweet's text. If the username is invalid or there is an authentication error, the function should return an appropriate error message.
  def get_recent_tweets(username):
      import tweepy
  
      try:
          # Authenticate to Twitter
          auth = tweepy.OAuthHandler("CONSUMER_KEY", "CONSUMER_SECRET")
          auth.set_access_token("ACCESS_TOKEN", "ACCESS_TOKEN_SECRET")
          api = tweepy.API(auth)
  
          # Get the most recent tweets from the given user
          tweets = api.user_timeline(screen_name=username)
  
          for tweet in tweets:
              print(tweet.text)
          return "Tweets retrieved successfully."
  
      except tweepy.TweepError as e:
          return f"Error: {str(e)}"
  
  assert get_recent_tweets("@elonmusk")=="Tweets retrieved successfully."
  assert get_recent_tweets("@invaliduser")=="Error: Invalid username."
  assert get_recent_tweets("")=="Error: Invalid parameter not valid on its own for empty query"
  assert get_recent_tweets("@userwithnoapiaccess")=="Error: API access blocked."
output: def get_recent_tweets(username):
      import tweepy
  
      try:
          auth = tweepy.OAuthHandler("CONSUMER_KEY", "CONSUMER_SECRET")
          auth.set_access_token("ACCESS_TOKEN", "ACCESS_TOKEN_SECRET")
          api = tweepy.API(auth)
  
          tweets = api.user_timeline(screen_name=username)
  
          for tweet in tweets:
              print(tweet.text)
          return "Tweets retrieved successfully."
  
      except tweepy.TweepError as e:
          return f"Error: {str(e)}"