input: Write a function to translate a text from English to French using Python. The function should install the necessary module if not already installed, create a Translator object, define the text to be translated, call the translate function, and print the translated text. If the text to be translated is an empty string, the function should print an empty string.
  
  def translate_text_to_french(text: str) -> None:
      try:
          # import module
          from googletrans import Translator
          
          # create an object
          translator = Translator()
          
          # check if text is empty
          if not text:
              print("")
              return
          
          # call the function and pass the text
          translation = translator.translate(text, dest='fr')
          
          # print the translation
          print(translation.text)
      except ImportError:
          print("Please install the googletrans module using 'pip install googletrans'")
  
  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("How are you?")=="Comment ça va?"
  assert translate_text_to_french("")==""
  assert translate_text_to_french("Python is great!")=="Python est super!"
  assert translate_text_to_french("This is a test.")=="Ceci est un test."
output: def translate_text_to_french(text: str) -> None:
      try:
          from googletrans import Translator
          translator = Translator()
          if not text:
              print("")
              return
          translation = translator.translate(text, dest='fr')
          print(translation.text)
      except ImportError:
          print("Please install the googletrans module using 'pip install googletrans'")