def _find_lcs(self, node, stringIdxs):
nodes = [self._find_lcs(n, stringIdxs)<EOL>for (n,_) in node.transition_links<EOL>if n.generalized_idxs.issuperset(stringIdxs)]<EOL>if nodes == []:<EOL><INDENT>return node<EOL><DEDENT>deepestNode = max(nodes, key=lambda n: n.depth)<EOL>return deepestNode<EOL>
Helper method that finds LCS by traversing the labeled GSD.