def get_base(node):
    """Return current node's basal node in tree

    Parameters
    ----------
    node : skbio.TreeNode
        query node

    Returns
    -------
    skbio.TreeNode
        basal node of query node

    Notes
    -----
    A "basal" node is defined as a child node of root.

    See Also
    --------
    scikit-bio's `root` function

    Examples
    --------
    >>> from skbio import TreeNode
    >>> tree = TreeNode.read(['(((a,b)n6,(c,d)n5)n3,((e,f)n4,g)n2)n1;'])
    >>> node = tree.find('a')
    >>> print(get_base(node).name)
    n3
    """
    if node.is_root():
        raise ValueError('Root has no base.')
    cnode = node
    while True:
        pnode = cnode.parent
        if pnode.is_root():
            break
        cnode = pnode
    return cnode