Two-phase commit outcome
Your task
A coordinator runs two-phase commit across participants. In the prepare phase each participant votes: 'yes', 'no', or 'timeout' (no reply within the window). The protocol commits ONLY if every participant voted 'yes'; if any participant voted 'no' or 'timeout', the coordinator aborts. Given the list of votes, return 'commit' or 'abort'. An empty participant set commits (vacuously, nothing to coordinate).
Examples
two_phase_decision(votes: list[str]) -> strExample 1
Input
two_phase_decision(["yes", "yes", "yes"])Output
"commit"