<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_urgent(self, sensors):
 """ Determine if any sensors should set the urgent flag. """

        if self.urgent_on not in ('warning', 'critical'):
            raise Exception("urgent_on must be one of (warning, critical)")
        for sensor in sensors:
            if self.urgent_on == 'warning' and sensor.is_warning():
                return True
            elif self.urgent_on == 'critical' and sensor.is_critical():
                return True
        return False