input: from typing import List, Optional
  
  def translate_text(text: str, destination_language: str, translator_obj: Optional = None) -> str:
      """ Translate a text from one language to another using a provided translator object.
      If no translator object is provided, it will import and use the googletrans Translator.
      >>> translate_text("Hello, this is a sample text to translate.", 'fr')
      'Bonjour, ceci est un texte d'exemple à traduire.'
      """
      if translator_obj is None:
          from googletrans import Translator
          translator_obj = Translator()
      translation = translator_obj.translate(text, dest=destination_language)
      return translation.text
output:     if translator_obj is None:
          from googletrans import Translator
          translator_obj = Translator()
      translation = translator_obj.translate(text, dest=destination_language)
      return translation.text