breached(tickets) where each ticket is (id, priority, hours_open) — return the list of ids whose open time exceeds their SLA, keeping input order. Unknown priorities default to 24.breached([(1, 'urgent', 5), (2, 'low', 50), (3, 'high', 8)])
[1]
Only the urgent ticket blew its 4-hour SLA; 8 == 8 is not a breach.
A dict of priority → hours.
.get(priority, 24) covers unknowns.