Given a list of metric events sorted by non-decreasing timestamp and an integer window_size, return the alerts that should be emitted after deduplicating duplicates within the last window_size seconds. Each event is a dictionary with timestamp, metric, severity, and value. Two events are duplicates if they have the same metric and severity, and their timestamps differ by at most window_size. Keep the first event and suppress later duplicates inside the active window.
1 <= len(events) <= 10^50 <= window_size <= 10^9events[i]["timestamp"] is sorted in non-decreasing ordertimestamp is an integermetric and severity are non-empty strings