def METHOD_NAME(task_type: TaskType, task_id: str, state: str, ticks: int = 60) -> None:
    for _ in range(ticks):
        info = get_task_info(task_type, task_id)
        gotten_state = info.get("state")
        if gotten_state == state:
            return
        time.sleep(1)
    print(subprocess.check_output(["det", "-m", conf.make_master_url(), "task", "logs", task_id]))
    pytest.fail(f"{task_type} expected {state} state got {gotten_state} instead after {ticks} secs")