class_docstr: Entity position swap with paraphrase(birth related)
docstr: generate new sentence if birth is root
  
  :param int idx: the idx of word "bear" in sentence
  :param list tokens: tokens of the sentence
  :param list pos_tags: pos tagging labels of the sentence
  :param list heads: stanford heads
  
  :return string: transformed sentence
code: def generate_birth_for_root(self, idx, tokens, pos_tags, heads):
      r"""generate new sentence if birth is root
  
      :param int idx: the idx of word "bear" in sentence
      :param list tokens: tokens of the sentence
      :param list pos_tags: pos tagging labels of the sentence
      :param list heads: stanford heads
  
      :return string: transformed sentence
  
      """
      new_sen = tokens[: idx - 1]
  
      v = -1
      for pos in range(idx + 1, len(tokens)):
          if pos_tags[pos].startswith("V") and heads[pos] == idx + 1:
              v = pos
      if v < 0:
          return []
      else:
          born = tokens[idx - 1 : v]
          if tokens[v - 1] == "and":
              born.pop()
          new_sen.extend([","] + tokens[v:-1] + [","] + born + ["."])
  
      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 3 for calling the SwapBirth obj's underlying member method code with example usage: obj.generate_birth_for_root(idx, tokens, pos_tags, heads) and returns: new_sen, list