class_docstr: A data structure to represent a parse tree
class_docstr_tok: ["A","data","structure","to","represent","a","parse","tree"]
docstr: Flip a tree backwards
  
  The intent is to train a parser backwards to see if the
  forward and backwards parsers can augment each other
docstr_tok: ["Flip","a","tree","backwards","The","intent","is","to","train","a","parser","backwards","to","see","if","the","forward","and","backwards","parsers","can","augment","each","other"]
code: def reverse(self):
      """
      Flip a tree backwards
  
      The intent is to train a parser backwards to see if the
      forward and backwards parsers can augment each other
      """
      if self.is_leaf():
          return Tree(self.label)
  
      new_children = [
          child.reverse() for child in reversed(self.children)
      ]
      return Tree(self.label, new_children)
  
imports: from collections import deque, Counter
  from enum import Enum
  from io import StringIO
  import itertools
  import re
  import warnings
  from stanza.models.common.stanza_object import StanzaObject
label_desc: Use image node_id 23 for calling the Tree obj's underlying member method code with example usage: obj.reverse() and returns: Tree, Tree