GoogleEasyPython00:00

Welcome to the Python screen for the DevOps Engineer role at Google.
The question is on your right: Rate Limit Log Stream Alerts. Read through the requirements first.
Would you like to talk through your approach, or are you ready to start coding?
In Google Cloud monitoring pipelines, SRE tooling often needs to suppress duplicate alerts from noisy log streams. Given a sequence of log events sorted by timestamp, return which events should trigger an alert if the same message may only be alerted once every 10 seconds.
Implement a function that takes logs, where each element is a pair [timestamp, message]:
timestamp is an integer number of secondsmessage is a stringlogs is sorted in non-decreasing order by timestampReturn a list of booleans of the same length where result[i] is true if logs[i] should be alerted, otherwise false.
A message should be alerted if either:
def rate_limit_alerts(logs):