input: Write a function to query Twitter and get the most recent tweets from a given user. The function should accept a username as input and use the tweepy library to authenticate and fetch the tweets. If the authentication fails, the function should raise an error. If the username does not exist, the function should return an empty list.
  assert get_recent_tweets("@elonmusk")==["Tweet1", "Tweet2"]
  assert get_recent_tweets("@invaliduser")==[]
  assert get_recent_tweets("@doesnotexist")==[]
  try:
   get_recent_tweets("@invalid_auth")
  except Exception as e:
   assert str(e)=="Authentication failed"
  assert get_recent_tweets("@")==[]
output: def get_recent_tweets(username):
      import tweepy
      try:
          auth = tweepy.OAuth1UserHandler("API_KEY", "API_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET")
          api = tweepy.API(auth)
          tweets = api.user_timeline(screen_name=username, count=2)
          return [tweet.text for tweet in tweets]
      except tweepy.TweepError as e:
          if "401" in str(e):
              raise Exception("Authentication failed")
          elif "404" in str(e):
              return []
          else:
              raise