code: def last_time_non_ok_or_up(self):
          
          non_ok_times = [x for x in [self.last_time_down]
                          if x > self.last_time_up]
          if not non_ok_times:
              last_time_non_ok = 0  # todo: program_start would be better?
          else:
              last_time_non_ok = min(non_ok_times)
          return last_time_non_ok
docs: Get the last time the host was in a non-OK state
  
          :return: self.last_time_down if self.last_time_down > self.last_time_up, 0 otherwise
          :rtype: int