def report_failed_experiment(experiment_id: int) -> None:
    trials = experiment_trials(experiment_id)
    active = sum((1 for t in trials if (t['state'] == 'ACTIVE')))
    paused = sum((1 for t in trials if (t['state'] == 'PAUSED')))
    stopping_completed = sum((1 for t in trials if (t['state'] == 'STOPPING_COMPLETED')))
    stopping_canceled = sum((1 for t in trials if (t['state'] == 'STOPPING_CANCELED')))
    stopping_error = sum((1 for t in trials if (t['state'] == 'STOPPING_ERROR')))
    completed = sum((1 for t in trials if (t['state'] == 'COMPLETED')))
    canceled = sum((1 for t in trials if (t['state'] == 'CANCELED')))
    errored = sum((1 for t in trials if (t['state'] == 'ERROR')))
    stopping_killed = sum((1 for t in trials if (t['state'] == 'STOPPING_KILLED')))
    print(f'Experiment {experiment_id}: {len(trials)} trials, {completed} completed, {active} active, {paused} paused, {stopping_completed} stopping-completed, {stopping_canceled} stopping-canceled, {stopping_error} stopping-error, {stopping_killed} stopping-killed, {canceled} canceled, {errored} errored', file=sys.stderr)
    for trial in trials:
        print_trial_logs(trial['id'])
def report_failed_experiment(experiment_id: int) -> None:
    trials = experiment_trials(experiment_id)
    active = sum((1 for t in trials if (t['state'] == 'ACTIVE')))
    paused = sum((1 for t in trials if (t['state'] == 'PAUSED')))
    stopping_completed = sum((1 for t in trials if (t['state'] == 'STOPPING_COMPLETED')))
    stopping_canceled = sum((1 for t in trials if (t['state'] == 'STOPPING_CANCELED')))
    stopping_error = sum((1 for t in trials if (t['state'] == 'STOPPING_ERROR')))
    completed = sum((1 for t in trials if (t['state'] == 'COMPLETED')))
    canceled = sum((1 for t in trials if (t['state'] == 'CANCELED')))
    errored = sum((1 for t in trials if (t['state'] == 'ERROR')))
    stopping_killed = sum((1 for t in trials if (t['state'] == 'STOPPING_KILLED')))
    print(f'Experiment {experiment_id}: {len(trials)} trials, {completed} completed, {active} active, {paused} paused, {stopping_completed} stopping-completed, {stopping_canceled} stopping-canceled, {stopping_error} stopping-error, {stopping_killed} stopping-killed, {canceled} canceled, {errored} errored', file=sys.stderr)
    for trial in trials:
        print_trial_logs(trial['id'])