input: Write a function to translate a text from English to French using Python. The function should use the `googletrans` module to perform the translation. If the input text is empty, return an empty string.
  assert translate_text("Hello, this is a sample text to translate.")== "Bonjour, ceci est un exemple de texte à traduire."
  assert translate_text("I love programming.")== "J'aime programmer."
  assert translate_text("")== ""
output: def translate_text(text):
      if not text:
          return ""
      from googletrans import Translator
      translator = Translator()
      translation = translator.translate(text, src='en', dest='fr')
      return translation.text