input: Write a function to translate a text from English to French using Python.
  
  
  from googletrans import Translator
  
  def english_to_french(text):
      translator = Translator()
      translation = translator.translate(text, dest='fr')
      return translation.text
  
  assert english_to_french("Hello, this is a sample text to translate.") == "Bonjour, c'est un exemple de texte à traduire."
  assert english_to_french("Good morning") == "Bonjour"
  assert english_to_french("How are you?") == "Comment vas-tu?"
  assert english_to_french("Thank you") == "Je vous remercie"
  assert english_to_french("Goodbye") == "Au revoir"
  
output: translator = Translator()
      translation = translator.translate(text, dest='fr')
      return translation.text