input: Write a function to translate a text from English to French using Python. The function should use the `googletrans` library and return the translated text as a string.
  assert translate_text_to_french('Hello, this is a sample text to translate.') == 'Bonjour, ceci est un exemple de texte à traduire.'
  assert translate_text_to_french('Good morning') == 'Bonjour'
  assert translate_text_to_french('How are you?') == 'Comment ça va ?'
  assert translate_text_to_french('') == ''
  assert translate_text_to_french('Python programming is fun') == 'La programmation en Python est amusante'
output: def translate_text_to_french(text):
      from googletrans import Translator
      translator = Translator()
      translation = translator.translate(text, src='en', dest='fr')
      return translation.text