def merge_task_lists(runset_results, tasks):
    for runset in runset_results:
        # create mapping from id to RunResult object
        # Use reversed list such that the first instance of equal tasks end up in dic
        dic = dict([(run_result.task_id, run_result) for run_result in reversed(runset.results)])
        runset.results = [] # clear and repopulate results
        for task in tasks:
            run_result = dic.get(task)
            if run_result is None:
                logging.info("    no result for task '%s'", task[0])
                # create an empty dummy element
                run_result = RunResult(task, None, result.CATEGORY_MISSING, 0, None,
                                       runset.columns, [None]*len(runset.columns))
            runset.results.append(run_result)
image actions command validation
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/tablegenerator/__init__.py/merge_task_lists--crossover with--dataset/ETHPy150Open yspanchal/docli/docli/commands/image_actions.py/validate