code: def _get_transformations(self, current_text, indices_to_modify):
      transformed_texts = []
      if self.language == "en":
          model_name = "ner"
      elif self.language == "fra" or self.language == "french":
          model_name = "flair/ner-french"
      else:
          model_name = "flair/ner-multi-fast"
  
      if self.consistent:
          word_to_indices = defaultdict(list)
          for i in indices_to_modify:
              word_to_replace = current_text.words[i].capitalize()
              word_to_indices[word_to_replace].append(i)
  
      for i in indices_to_modify:
          word_to_replace = current_text.words[i].capitalize()
          # If we're doing consistent replacements, only replace the word
          # if it hasn't already been replaced in a previous iteration
          if self.consistent and word_to_replace not in word_to_indices:
              continue
          word_to_replace_ner = current_text.ner_of_word_index(
              i, model_name
          )
  
          replacement_words = self._get_replacement_words(
              word_to_replace, word_to_replace_ner
          )
  
          for r in replacement_words:
              if self.consistent:
                  transformed_texts.append(
                      current_text.replace_words_at_indices(
                          word_to_indices[word_to_replace],
                          [r] * len(word_to_indices[word_to_replace]),
                      )
                  )
              else:
                  transformed_texts.append(
                      current_text.replace_word_at_index(i, r)
                  )
  
          # Delete this word to mark it as replaced
          if self.consistent and len(replacement_words) != 0:
              del word_to_indices[word_to_replace]
  
      return transformed_texts
  
file_path: TextAttack/textattack/transformations/word_swaps/word_swap_change_name.py
imports: from collections import defaultdict
  import numpy
  from textattack.shared.data import PERSON_NAMES
  from .word_swap import WordSwap
label_desc: Use image node_id 2 for calling the WordSwapChangeName obj's underlying member method code with example usage: obj._get_transformations(current_text, indices_to_modify) and returns: transformed_texts