class_docstr: wordnum:height*wordnum:height*...
  wordnum:height,
class_docstr_tok: ["wordnum",":","height","*","wordnum",":","height","*","...","wordnum",":","height",","]
docstr: Convert this pointer to a standard 'tree position' pointer,
  given that it points to the given tree.
code: def treepos(self, tree):
      """
      Convert this pointer to a standard 'tree position' pointer,
      given that it points to the given tree.
      """
      if tree is None:
          raise ValueError("Parse tree not available")
      stack = [tree]
      treepos = []
  
      wordnum = 0
      while True:
          # tree node:
          if isinstance(stack[-1], Tree):
              # Select the next child.
              if len(treepos) < len(stack):
                  treepos.append(0)
              else:
                  treepos[-1] += 1
              # Update the stack.
              if treepos[-1] < len(stack[-1]):
                  stack.append(stack[-1][treepos[-1]])
              else:
                  # End of node's child list: pop up a level.
                  stack.pop()
                  treepos.pop()
          # word node:
          else:
              if wordnum == self.wordnum:
                  return tuple(
                      treepos[: len(treepos) - self.height - 1]
                  )
              else:
                  wordnum += 1
                  stack.pop()
  
imports: import re
  from functools import total_ordering
  from xml.etree import ElementTree
  from nltk.corpus.reader.api import *
  from nltk.corpus.reader.util import *
  from nltk.internals import raise_unorderable_types
  from nltk.tree import Tree
label_desc: Use image node_id 9 for calling the PropbankTreePointer obj's underlying member method code with example usage: obj.treepos(tree) and returns: tuple