def lca_wrapper(executor, tree, key1, key2): strip_parent_link(tree) result = executor.run( functools.partial(lca, tree, must_find_node(tree, key1), must_find_node(tree, key2))) if result is None: raise TestFailure("Result can't be None") return result.data
def lca_wrapper(executor, tree, key1, key2): strip_parent_link(tree) result = executor.run( functools.partial(lca, tree, must_find_node(tree, key1), must_find_node(tree, key2))) if result is None: raise TestFailure("Result can't be None") return result.data
def lca_wrapper(timer, tree, key1, key2): strip_parent_link(tree) timer.start() result = lca(tree, must_find_node(tree, key1), must_find_node(tree, key2)) timer.stop() if result is None: raise TestFailureException("Result can't be None") return result.data