def lca_taxonomy(self, deduplicated_sequences, taxonomy_hash):
to_return = []<EOL>for dup_group in deduplicated_sequences:<EOL><INDENT>lca = taxonomy_hash[dup_group[<NUM_LIT:0>].name]<EOL>for s in dup_group[<NUM_LIT:1>:]:<EOL><INDENT>for i, tax in enumerate(taxonomy_hash[s.name]):<EOL><INDENT>if i >= len(lca) or tax != lca[i]:<EOL><INDENT>lca = lca[:i]<EOL>break<EOL><DEDENT><DEDENT>if len(lca) > len(taxonomy_hash[s.name]):<EOL><INDENT>lca = lca[:len(taxonomy_hash[s.name])]<EOL><DEDENT><DEDENT>to_return.append(lca)<EOL><DEDENT>return to_return<EOL>
r'''Given a set of deduplicated sequences and a taxonomy hash,
        return the respective LCAs of taxonomy

        Parameters
        ----------
        deduplicated_sequences: Array of arrays of Sequence objects
            as output from deduplicate()
        taxonomy_hash: dictionary 
            of sequence names to taxonomy array (i.e. array of str)

        Returns
        -------
        Array of taxonomy LCAs