def is_urgent(self):
if not self.current_event:<EOL><INDENT>return False<EOL><DEDENT>now = datetime.now(tz=self.current_event.start.tzinfo)<EOL>alert_time = now + timedelta(seconds=self.urgent_seconds)<EOL>urgent = alert_time > self.current_event.start<EOL>if urgent and self.urgent_blink:<EOL><INDENT>urgent = now.second % <NUM_LIT:2> == <NUM_LIT:0> and not self.urgent_acknowledged<EOL><DEDENT>return urgent<EOL>
Determine whether or not to set the urgent flag. If urgent_blink is set, toggles urgent flag
on and off every second.