def __extant(tree):
    """
    Internal function returning a list of non-extinct leaves in a tree.

    Parameters
    ----------

    tree: ete3 tree object
        The tree whose nodes will be checked.

    Returns
    -------
    leaves: list
        List of extant leaves.
    """

    # Return a filtered list compiled with a list comprehension; the
    # 'extinct' field is not part of ETE3 defaults, but we use here in
    # order to easily differentiate between alive and extinct leaves in
    # Birth-Death models.
    return [leaf for leaf in tree.get_leaves() if leaf.extinct is False]