You are given tickets, a list of dictionaries. Each dictionary has the keys 'id' (int), 'priority' (str), 'status' (str) and 'hours_open' (int). You are also given sla_hours (int).
Return a set containing the id of every ticket that has breached the SLA. A ticket has breached the SLA when both of the following hold:
'status' is not equal to 'resolved', and'hours_open' is strictly greater than sla_hours.If no ticket qualifies, return an empty set.
NOTE: This is a function-type question — you only write the function. Do not read input or print anything; a hidden checker calls your function and checks its return value.
Arguments
[{'id': 1, 'priority': 'high', 'status': 'open', 'hours_open': 30}, {'id': 2, 'priority': 'low', 'status': 'resolved', 'hours_open': 50}]
24
Returns
{1}