code: def is_chief(task: backend.Task, run_name: str):
    
    global run_task_dict
    if run_name not in run_task_dict:
      return True
    task_list = run_task_dict[run_name]
    assert task in task_list, f"Task {task.name} doesn't belong to run {run_name}"
    return task_list[0] == task
docs: Returns True if task is chief task in the corresponding run