def wait_for_experiment_active_workload(experiment_id: int, max_ticks: int=conf.MAX_TASK_SCHEDULED_SECS) -> None:
    for _ in range(conf.MAX_TASK_SCHEDULED_SECS):
        if experiment_has_active_workload(experiment_id):
            return
        time.sleep(1)
    pytest.fail(f'The only trial cannot be scheduled within {max_ticks} seconds.')
def wait_for_experiment_active_workload(experiment_id: int, max_ticks: int=conf.MAX_TASK_SCHEDULED_SECS) -> None:
    for _ in range(conf.MAX_TASK_SCHEDULED_SECS):
        if experiment_has_active_workload(experiment_id):
            return
        time.sleep(1)
    pytest.fail(f'The only trial cannot be scheduled within {max_ticks} seconds.')