def METHOD_NAME(pnode):
    '''
    Get all the leaf nodes for the path tree which contains
    the pnode.
    Example: for leaf in getLeafNodes(root):
    '''
    root = getRootNode(pnode)
    ret = []
    todo = [root, ]
    while len(todo):
        x = todo.pop()
        if len(x[1]) == 0:
            ret.append(x)
            continue
        for n in x[1]:
            todo.append(n)
    return ret