input: Write a function to translate a given text from English to French using the `googletrans` module in Python. If the provided text is empty, return an empty string.
  
  from googletrans import Translator
  
  def translate_to_french(text):
      if not text:
          return ""
      translator = Translator()
      translation = translator.translate(text, dest='fr')
      return translation.text
  
  assert translate_to_french("Hello, this is a sample text to translate.") == "Bonjour, il s'agit d'un texte d'échantillon à traduire."
  assert translate_to_french("Good morning!") == "Bon matin !"
  assert translate_to_french("How are you?") == "Comment ça va ?"
  assert translate_to_french("") == ""
  assert translate_to_french("Python is great for automation.") == "Python est excellent pour l'automatisation."
output: if not text:
      return ""
  translator = Translator()
  translation = translator.translate(text, dest='fr')
  return translation.text