input: Write a function to generate a solution to translate a text from English to French using Python. Ensure the function includes the installation of the googletrans module, imports the necessary module, creates a translator object, defines a text to be translated, calls the translate function with the text, and prints the translated text.
  assert eng_to_fr("Hello, this is a sample text to translate.")=='Bonjour, ceci est un texte d\'exemple à traduire.'
  assert eng_to_fr("The weather is nice today.")=='Le temps est bon aujourd\'hui.'
  assert eng_to_fr("I love programming.")=='J\'aime programmer.'
  assert eng_to_fr("Python is easy to learn.")=='Python est facile à apprendre.'
  assert eng_to_fr("")=='Informations insuffisantes pour une traduction complète et précise.'
output: 
  def eng_to_fr(text):
      from googletrans import Translator
      translator = Translator()
      translated = translator.translate(text, src='en', dest='fr')
      return translated.text
  