class_docstr: A data structure to represent a parse tree
class_docstr_tok: ["A","data","structure","to","represent","a","parse","tree"]
docstr: Returns True if all leaves are under preterminals, False otherwise
docstr_tok: ["Returns","True","if","all","leaves","are","under","preterminals",",","False","otherwise"]
code: def all_leaves_are_preterminals(self):
      """
      Returns True if all leaves are under preterminals, False otherwise
      """
      if self.is_leaf():
          return False
  
      if self.is_preterminal():
          return True
  
      return all(t.all_leaves_are_preterminals() for t in self.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 7 for calling the Tree obj's underlying member method code with example usage: obj.all_leaves_are_preterminals() and returns: all, False, True