class_docstr: An abstract class that takes a sentence and transforms it by replacing
  some of its words.
  
  letters_to_insert (string): letters allowed for insertion into words
  (used by some char-based transformations)
code: def _get_transformations(self, current_text, indices_to_modify):
      words = current_text.words
      transformed_texts = []
  
      for i in indices_to_modify:
          word_to_replace = words[i]
          replacement_words = self._get_replacement_words(
              word_to_replace
          )
          transformed_texts_idx = []
          for r in replacement_words:
              if r == word_to_replace:
                  continue
              transformed_texts_idx.append(
                  current_text.replace_word_at_index(i, r)
              )
          transformed_texts.extend(transformed_texts_idx)
  
      return transformed_texts
  
file_path: TextAttack/textattack/transformations/word_swaps/word_swap.py
imports: import random
  import string
  from textattack.transformations import Transformation
label_desc: Use image node_id 4 for calling the WordSwap obj's underlying member method code with example usage: obj._get_transformations(current_text, indices_to_modify) and returns: transformed_texts