class_docstr: Transforms an input by Reverse gender or place names in sentences.
class_docstr_tok: ["Transforms","an","input","by","Reverse","gender","or","place","names","in","sentences","."]
docstr: Find the location and name to replace.
  
  :param list words: input sentence's tokens.
  :param int n: number of generated samples
  :return list change_pos: transformed pos list.
  :return list change_items: transformed items list.
docstr_tok: ["Find","the","location","and","name","to","replace",".",":","param","list","words",":","input","sentence","'s","tokens",".",":","param","int","n",":","number","of","generated","samples",":","return","list","change_pos",":","transformed","pos","list",".",":","return","list","change_items",":","transformed","items","list","."]
code: def _get_name_change(self, words, words_indices, n):
      r"""
      Find the location and name to replace.
  
      :param list words: input sentence's tokens.
      :param int n: number of generated samples
      :return list change_pos: transformed pos list.
      :return list change_items: transformed items list.
  
      """
      # Find the location of the name
      change_pos = []
      change_items = []
      flag = 0
  
      for i in range(len(words)):
          if not flag:
              if (
                  words[i] in self.woman_name
                  and self.prejudice_tendency == "man"
              ):
                  change_pos.append(words_indices[i])
                  change_items.append(random.sample(self.man_name, n))
                  flag = 1
              elif (
                  words[i] in self.man_name
                  and self.prejudice_tendency == "woman"
              ):
                  change_pos.append(words_indices[i])
                  change_items.append(random.sample(self.woman_name, n))
                  flag = 1
          else:
              flag = 0
          if not flag and words[i] in self.word:
              change_pos.append(words_indices[i])
              change_items.append([self.word[words[i]]])
  
      return change_pos, change_items
  
file_path: textflint/textflint/generation/transformation/UTCN/cn_prejudice.py
imports: import random
  from ..transformation import Transformation
  from ....common.utils.list_op import descartes
  from ....common.utils.load import json_loader
  from ....common.utils.install import download_if_needed
  from ....common.settings import PREJUDICE_LOC2IDX, CN_NAME_PATH, CN_PREJUDICE_WORD_PATH, CN_LOC2IDX_PATH
label_desc: Use image node_id 4 for calling the CnPrejudice obj's underlying member method code with example usage: obj._get_name_change(words, words_indices, n) and returns: change_pos,  change_items