class_docstr: This class serves as an intermediate representation of the
  pattern tree during the conversion to sets of leaf-to-root
  subpatterns
class_docstr_tok: ["This","class","serves","as","an","intermediate","representation","of","the","pattern","tree","during","the","conversion","to","sets","of","leaf-to-root","subpatterns"]
docstr: Generator that returns the leaves of the tree
docstr_tok: ["Generator","that","returns","the","leaves","of","the","tree"]
code: def leaves(self):
      "Generator that returns the leaves of the tree"
      for child in self.children:
          for x in child.leaves():
              yield x
      if not self.children:
          yield self
  
file_path: catboost/contrib/tools/python/src/Lib/lib2to3/btm_utils.py
imports: from .None import pytree
  from .pgen2 import grammar, token
  from .pygram import pattern_symbols, python_symbols
label_desc: Use image node_id 5 for calling the MinNode obj's underlying member method code with example usage: obj.leaves() without return types