class_docstr: Transforms parallelly an input by replacing the same word.
docstr: Returns a list containing all possible words .
  
  :param str word: token word to transform.
  :param str pos: pos tag
  :param int n: max number of candidates
  :return list candidates: candidates list
code: def _get_candidates(self, word, target, pos=None, n=1):
      r"""
      Returns a list containing all possible words .
  
      :param str word: token word to transform.
      :param str pos: pos tag
      :param int n: max number of candidates
      :return list candidates: candidates list
  
      """
      n = max(n, 1)
      last_target_index = target[2]
      candidates = []
      target_candidate_index = None
      if not word.isdigit():
          for index in range(last_target_index, len(target[0])):
              target_word = target[0][index]
              if word == target_word:
                  while True:
                      candidate = self.get_random_word(word)
  
                      if candidate not in candidates:
                          candidates.append(candidate)
  
                      if len(candidates) >= n:
                          break
                  target_candidate_index = target[1][index]
                  break
  
      return candidates, target_candidate_index
  
file_path: textflint/textflint/generation/transformation/NMT/swap_parallel_same_word.py
imports: import random
  import string
  from .parallel_word_substitute import ParallelWordSubstitute
label_desc: Use image node_id 3 for calling the SwapParallelSameWord obj's underlying member method code with example usage: obj._get_candidates(word, target, pos, n) and returns: candidates,  target_candidate_index