input: Write a function to translate a text from English to French using Python. The function should use the `googletrans` module and return the translated text.
  assert translate_text("Hello, this is a sample text to translate.") == "Bonjour, ceci est un exemple de texte à traduire."
  assert translate_text("How are you?") == "Comment vas-tu?"
  assert translate_text("Thank you!") == "Merci!"
  assert translate_text("") == ""
  assert translate_text("This is a test.") == "Ceci est un test."
output: def translate_text(text):
      from googletrans import Translator
      translator = Translator()
      translation = translator.translate(text, src='en', dest='fr')
      return translation.text