input: Write a function to translate a text from English to French using Python. Install the googletrans module using pip, import the Translator class from the module, create a Translator object, and use the translate method to translate the text specifying the destination language as French. Return the translated text string.
  assert fr_translate("Hello, this is a sample text to translate.") == "Bonjour, ceci est un texte d'échantillon à traduire."
  assert fr_translate("Good morning") == "Bonjour"
  assert fr_translate("How are you?") == "Comment ça va?"
  assert fr_translate("") == ""
  assert fr_translate("The weather is nice today.") == "Le temps est agréable aujourd'hui."
output: def fr_translate(text):
      from googletrans import Translator
      translator = Translator()
      translated = translator.translate(text, dest='fr')
      return translated.text