input: Write a function to translate a given text from English to French using the googletrans module. Ensure the function handles the installation and import of the module, and returns the translated text. If the input text is empty, return an empty string.
  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 allez-vous ?"
  assert translate_text("Good morning!")=="Bonjour !"
  assert translate_text("")==""
  assert translate_text("This is a test.")=="C'est un test."
output: try:
      from googletrans import Translator
  except ImportError:
      import subprocess
      import sys
      subprocess.check_call([sys.executable, "-m", "pip", "install", "googletrans==4.0.0-rc1"])
      from googletrans import Translator
  
  def translate_text(text):
      if not text:
          return ""
      translator = Translator()
      translation = translator.translate(text, src='en', dest='fr')
      return translation.text