def METHOD_NAME(pnode):
    '''
    Get the root node for the path tree which contains
    pnode.
    Example: root = getRootNode(branchnode)
    '''
    ret = pnode
    while pnode[0] is not None:
        pnode = pnode[0]
    return pnode