class_docstr: Entity position swap with paraphrase(birth related)
docstr: generate new sentence if birth is clause
  
  :param int idx: the idx of word "bear" in sentence
  :param list tokens: tokens of the sentence
  :param list deprels: stanford dependency relations
  
  :return string: transformed sentence
code: def generate_birth_for_clause(self, idx, tokens, deprels):
      r"""generate new sentence if birth is clause
  
      :param int idx: the idx of word "bear" in sentence
      :param list tokens: tokens of the sentence
      :param list deprels: stanford dependency relations
  
      :return string: transformed sentence
  
      """
      root_id = -1
      for k, r in enumerate(deprels):
          if r == "ROOT":
              root_id = k
      if root_id < idx:
          return []
      end = root_id - 1
      while tokens[end] != ",":
          end = end - 1
      born = tokens[idx:end]
      if idx - 1 >= 0 and tokens[idx - 1] == ",":
          new_sen = tokens[: idx - 1] + tokens[end + 1 :]
      elif idx - 2 >= 0 and tokens[idx - 2] == "who":
          if idx - 3 >= 0 and tokens[idx - 3] == ",":
              new_sen = tokens[: idx - 3] + tokens[end + 1 :]
          else:
              new_sen = tokens[: idx - 2] + tokens[end + 1 :]
      else:
          return []
  
      new_sen = ["Born"] + born[1:] + [","] + new_sen
  
      return new_sen
  
file_path: textflint/textflint/generation/transformation/RE/swap_birth.py
imports: from ....input.component.sample import RESample
  from ...transformation import Transformation
label_desc: Use image node_id 4 for calling the SwapBirth obj's underlying member method code with example usage: obj.generate_birth_for_clause(idx, tokens, deprels) and returns: new_sen, list, list