def draw_all_task(tensor_access_by_tensor, swap_scheduler, job_num):
    for job_id in range(job_num):
        tmp = list(tensor_access_by_tensor[job_id].values())
        res = []
        for sub_list in tmp:
            res.extend(sub_list)
        draw(sorted(res, key=(lambda x: x.start_time)), swap_scheduler[job_id])
def draw_all_task(tensor_access_by_tensor, swap_scheduler, job_num):
    for job_id in range(job_num):
        tmp = list(tensor_access_by_tensor[job_id].values())
        res = []
        for sub_list in tmp:
            res.extend(sub_list)
        draw(sorted(res, key=(lambda x: x.start_time)), swap_scheduler[job_id])