def METHOD_NAME():
    tasks = []
    for n in [2, 4]:
        tasks.append(
            auto_scheduler.SearchTask(
                func=matmul_auto_scheduler_test, args=(n, n, n), target="llvm"
            )
        )
    def objective_func(costs):
        return 1e5 * costs[0]
    with tempfile.NamedTemporaryFile() as fp:
        log_file = fp.name
        n_trials = 5
        # Tune all tasks
        measure_ctx = auto_scheduler.LocalRPCMeasureContext()
        tune_option = auto_scheduler.TuningOptions(
            num_measure_trials=n_trials,
            runner=measure_ctx.runner,
            num_measures_per_round=1,
            measure_callbacks=[auto_scheduler.RecordToFile(log_file)],
        )
        task_scheduler = auto_scheduler.TaskScheduler(
            tasks, objective_func=objective_func, callbacks=[]
        )
        # Forcely rewrite the initial values.
        # This can make this test more stable on the slow CI machines
        task_scheduler.best_costs = np.array([1e2, 1e-8])
        task_scheduler.tune(tune_option, search_policy="sketch.random")
        # Check the allocation results
        counters = {}
        for task in tasks:
            counters[task.workload_key] = 0
        for inp, _ in auto_scheduler.load_records(log_file):
            counters[inp.task.workload_key] += 1
        assert counters[tasks[0].workload_key] == n_trials - 1
        assert counters[tasks[1].workload_key] == 1
        del measure_ctx