code: def get_next_notif_time(self, t_wished, status, creation_time, interval, escal_period):
          
          short_states = {u'WARNING': 'w', u'UNKNOWN': 'u', u'CRITICAL': 'c',
                          u'RECOVERY': 'r', u'FLAPPING': 'f', u'DOWNTIME': 's',
                          u'DOWN': 'd', u'UNREACHABLE': 'u', u'OK': 'o', u'UP': 'o'}
  
          # If we are not time based, we bail out!
          if not self.time_based:
              return None
  
          # Check if we are valid
          if status in short_states and short_states[status] not in self.escalation_options:
              return None
  
          # Look for the min of our future validity
          start = self.first_notification_time * interval + creation_time
  
          # If we are after the classic next time, we are not asking for a smaller interval
          if start > t_wished:
              return None
  
          # Maybe the time we found is not a valid one....
          if escal_period is not None and not escal_period.is_time_valid(start):
              return None
  
          # Ok so I ask for my start as a possibility for the next notification time
          return start
docs: Get the next notification time for the escalation
          Only legit for time based escalation
  
          :param t_wished: time we would like to send a new notification (usually now)
          :type t_wished:
          :param status: status of the host or service
          :type status:
          :param creation_time: time the notification was created
          :type creation_time:
          :param interval: time interval length
          :type interval: int
          :return: timestamp for next notification or None
          :rtype: int | None