def METHOD_NAME(self, val1, val2):
    path1 = self.get_node_path(val1)
    path2 = self.get_node_path(val2)
    try:
        store = None
        if len(path1) != len(path2):
            min_list = min(path1, path2, key=len)
            max_list = max(path1, path2, key=len)
        min_list, max_list = path1, path2
        for lca1 in min_list:
            for lca2 in max_list:
                if lca1 == lca2:
                    store = lca1
        return store
    except:
        return None