def _find_common_prefix(self, node1, node2):
tokens1 = [item.strip() for item in node1.split(self.node_separator)]<EOL>tokens2 = [item.strip() for item in node2.split(self.node_separator)]<EOL>ret = []<EOL>for token1, token2 in zip(tokens1, tokens2):<EOL><INDENT>if token1 == token2:<EOL><INDENT>ret.append(token1)<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>return self.node_separator.join(ret)<EOL>
Find common prefix between two nodes.