def lowest_common_ancestor(taxa1, taxa2, taxa_tree):
    """Return a string giving the lowest common ancestor of taxa{1, 2}.

    Compute the most specific taxonomic rank shared by taxa1 and taxa2.
    e.g. if taxa1 is 'Staphylococcus aureus' and taxa2 is 'Staphylococcus
    lugdunensis' this function should return 'Staphylococcus'.

    Use `taxa_tree.ancestors(<taxon>)` to get a list of ancestors for taxon.
    """
    ancestors1 = set(taxa_tree.ancestors(taxa1))
    for ancestor in taxa_tree.ancestors(taxa2):
        if ancestor in ancestors1:
            return ancestor