input: Write a function to translate a text from English to French using the Google Translate API. If the input text is empty, return an empty string.
  from googletrans import Translator
  
  def english_to_french(text):
      if not text:
          return ""
      translator = Translator()
      translation = translator.translate(text, dest='fr')
      return translation.text
  
  assert english_to_french("Hello, this is a sample text to translate.") == "Bonjour, ceci est un texte d'exemple à traduire."
  assert english_to_french("") == ""
  assert english_to_french("How are you?") == "Comment es-tu?"
  assert english_to_french("Nice to meet you!") == "Ravi de vous rencontrer !"
output: def english_to_french(text):
      if not text:
          return ""
      translator = Translator()
      translation = translator.translate(text, dest='fr')
      return translation.text