class_docstr: A base class for word insertions.
class_docstr_tok: ["A","base","class","for","word","insertions","."]
docstr: Return a set of transformed texts obtained by insertion a new word in `indices_to_modify`
  Args:
      current_text (AttackedText): Current text to modify.
      indices_to_modify (list[int]): List of positions in which to insert a new word.
  
  Returns:
      list[AttackedText]: List of transformed texts
docstr_tok: ["Return","a","set","of","transformed","texts","obtained","by","insertion","a","new","word","in","`","indices_to_modify","`","Args",":","current_text","(","AttackedText",")",":","Current","text","to","modify",".","indices_to_modify","(","list","[","int","]",")",":","List","of","positions","in","which","to","insert","a","new","word",".","Returns",":","list","[","AttackedText","]",":","List","of","transformed","texts"]
code: def _get_transformations(self, current_text, indices_to_modify):
      """
      Return a set of transformed texts obtained by insertion a new word in `indices_to_modify`
      Args:
          current_text (AttackedText): Current text to modify.
          indices_to_modify (list[int]): List of positions in which to insert a new word.
  
      Returns:
          list[AttackedText]: List of transformed texts
      """
      transformed_texts = []
  
      for i in indices_to_modify:
          new_words = self._get_new_words(current_text, i)
  
          new_transformted_texts = []
          for w in new_words:
              new_transformted_texts.append(
                  current_text.insert_text_before_word_index(i, w)
              )
          transformed_texts.extend(new_transformted_texts)
  
      return transformed_texts
  
imports: from textattack.transformations import Transformation
label_desc: Use image node_id 2 for calling the WordInsertion obj's underlying member method code with example usage: obj._get_transformations(current_text, indices_to_modify) and returns: transformed_texts