input: Write a function to translate a text from English to French using Python. The function should use the `googletrans` library to perform the translation. If the text is empty, the function should 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("The quick brown fox jumps over the lazy dog.") == "Le rapide renard brun saute par-dessus le chien paresseux."
  assert english_to_french("Python is a great programming language.") == "Python est un excellent langage de programmation."
  assert english_to_french("I love coding.") == "J'aime coder."
output: def english_to_french(text):
      if not text:
          return ""
      translator = Translator()
      translation = translator.translate(text, dest='fr')
      return translation.text