input: Write a function to translate a text from English to French using Python. If the text is not in English or cannot be translated, return 'Translation failed'. If the text is empty, return 'Empty text'.
  assert English_to_French("Hello, this is a sample text to translate.")=="Bonjour, ceci est un exemple de texte à traduire."
  assert English_to_French("This will fail")=='Translation failed'
  assert English_to_French("")=='Empty text'
  assert English_to_French("Bonjour")=='Translation failed'
output: def English_to_French(text):
      if not text:
          return 'Empty text'
      try:
          from googletrans import Translator
          translator = Translator()
          translation = translator.translate(text, src='en', dest='fr')
          return translation.text
      except:
          return 'Translation failed'