class_docstr: A data structure to represent a parse tree
class_docstr_tok: ["A","data","structure","to","represent","a","parse","tree"]
docstr: Return a copy of the tree with the -=# removed
  
  Leaves the text of the leaves alone.
docstr_tok: ["Return","a","copy","of","the","tree","with","the","-=","#","removed","Leaves","the","text","of","the","leaves","alone","."]
code: def simplify_labels(self, pattern=CONSTITUENT_SPLIT):
      """
      Return a copy of the tree with the -=# removed
  
      Leaves the text of the leaves alone.
      """
      new_label = self.label
      # check len(new_label) just in case it's a tag of - or =
      if (
          new_label
          and not self.is_leaf()
          and len(new_label) > 1
          and new_label not in ("-LRB-", "-RRB-")
      ):
          new_label = pattern.split(new_label)[0]
      new_children = [
          child.simplify_labels(pattern) for child in self.children
      ]
      return Tree(new_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 22 for calling the Tree obj's underlying member method code with example usage: obj.simplify_labels(pattern) and returns: Tree