def lowest_common_ancestor(go_tree, term1, term2):
    """
    Find the lowest common ancestor (LCS) of all paths in the GO DAG.

    :param go_tree:
    :param term1:
    :param term2:
    :return: List of LCS's found on each possible path.
    """
    go_term1 = go_tree[term1]
    go_term2 = go_tree[term2]

    if go_term1 == go_term2:
        return [term1]

    lcs = list()
    # iterate over parents of the most specific node (lower in tree)
    if go_term1.information_content > go_term2.information_content:
        for parent in go_term1.parents:
            subsumer = lowest_common_ancestor(go_tree, parent, go_term2.go_id)
            if not subsumer:
                continue
            lcs += subsumer
    else:
        for parent in go_term2.parents:
            subsumer = lowest_common_ancestor(go_tree, go_term1.go_id, parent)
            if not subsumer:
                continue
            lcs += subsumer

    return lcs