parameters: (self)
docstring: Returns the next leaf in the parser tree.
          Returns None if this is the last element in the parser tree.
docstring_summary: Returns the next leaf in the parser tree.
          Returns None if this is the last element in the parser tree.
docstring_tokens: Returns the next leaf in the parser tree . Returns None if this is the last element in the parser tree .
function: def get_next_leaf(self):
          """
          Returns the next leaf in the parser tree.
          Returns None if this is the last element in the parser tree.
          """
          node = self
          while True:
              c = node.parent.children
              i = c.index(node)
              if i == len(c) - 1:
                  node = node.parent
                  if node.parent is None:
                      return None
              else:
                  node = c[i + 1]
                  break
  
          while True:
              try:
                  node = node.children[0]
              except AttributeError:  # A Leaf doesn't have children.
                  return node
function_tokens: def get_next_leaf ( self ) : node = self while True : c = node . parent . children i = c . index ( node ) if i == len ( c ) - 1 : node = node . parent if node . parent is None : return None else : node = c [ i + 1 ] break while True : try : node = node . children [ 0 ] except AttributeError : # A Leaf doesn't have children. return node