input: from typing import List
  
  def translate_text(input_text: str, target_lang: str = 'fr') -> str:
      """ Translate a given text from English to the specified target language using Python.
      >>> translate_text("Hello, this is a sample text to translate.")
      "Bonjour, ceci est un texte d'exemple à traduire."
      >>> translate_text("My name is John.", target_lang='es')
      "Mi nombre es John."
      """
      from googletrans import Translator
      translator = Translator()
      translation = translator.translate(input_text, dest=target_lang)
      return translation.text
output:     from googletrans import Translator
      translator = Translator()
      translation = translator.translate(input_text, dest=target_lang)
      return translation.text