def num_completed_trials(experiment_id: int) -> int:
    return sum(((1 if (t['state'] == 'COMPLETED') else 0) for t in experiment_trials(experiment_id)))
def num_completed_trials(experiment_id: int) -> int:
    return sum(((1 if (t['state'] == 'COMPLETED') else 0) for t in experiment_trials(experiment_id)))