class_docstr: A type of sentence level transformation that takes in a text input,
  translates it into target language and translates it back to source
  language.
  
  letters_to_insert (string): letters allowed for insertion into words
  (used by some char-based transformations)
  
  src_lang (string): source language
  target_lang (string): target language, for the list of supported language check bottom of this page
  src_model: translation model from huggingface that translates from source language to target language
  target_model: translation model from huggingface that translates from target language to source language
  chained_back_translation: run back translation in a chain for more perturbation (for example, en-es-en-fr-en)
  
  Example::
  
      >>> from textattack.transformations.sentence_transformations import BackTranslation
      >>> from textattack.constraints.pre_transformation import RepeatModification, StopwordModification
      >>> from textattack.augmentation import Augmenter
  
      >>> transformation = BackTranslation()
      >>> constraints = [RepeatModification(), StopwordModification()]
      >>> augmenter = Augmenter(transformation = transformation, constraints = constraints)
      >>> s = 'What on earth are you doing here.'
  
      >>> augmenter.augment(s)
code: def _get_transformations(self, current_text, indices_to_modify):
      transformed_texts = []
      current_text = current_text.text
  
      # to perform chained back translation, a random list of target languages are selected from the provided model
      if self.chained_back_translation:
          list_of_target_lang = random.sample(
              self.target_tokenizer.supported_language_codes,
              self.chained_back_translation,
          )
          for target_lang in list_of_target_lang:
              target_language_text = self.translate(
                  [current_text],
                  self.target_model,
                  self.target_tokenizer,
                  target_lang,
              )
              src_language_text = self.translate(
                  target_language_text,
                  self.src_model,
                  self.src_tokenizer,
                  self.src_lang,
              )
              current_text = src_language_text[0]
          return [AttackedText(current_text)]
  
      # translates source to target language and back to source language (single back translation)
      target_language_text = self.translate(
          [current_text],
          self.target_model,
          self.target_tokenizer,
          self.target_lang,
      )
      src_language_text = self.translate(
          target_language_text,
          self.src_model,
          self.src_tokenizer,
          self.src_lang,
      )
      transformed_texts.append(AttackedText(src_language_text[0]))
      return transformed_texts
  
file_path: TextAttack/textattack/transformations/sentence_transformations/back_translation.py
imports: import random
  from transformers import MarianMTModel, MarianTokenizer
  from textattack.shared import AttackedText
  from .sentence_transformation import SentenceTransformation
label_desc: Use image node_id 3 for calling the BackTranslation obj's underlying member method code with example usage: obj._get_transformations(current_text, indices_to_modify) and returns: transformed_texts, list