def METHOD_NAME():
    executor = datacube.executor.SerialExecutor()
    tasks = ({'val': i} for i in range(3))
    tasks_to_do = list(range(3))
    def task_func(task):
        x = task['val']
        return (x, x**2)
    def process_result_func(result):
        assert result[0]**2 == result[1]
        tasks_to_do.remove(result[0])
    run_tasks(tasks, executor, task_func, process_result_func)
    assert not tasks_to_do
    # no task proc specified
    tasks = ({'val': i} for i in range(3))
    run_tasks(tasks, executor, task_func)