code: def get_next_notification_time(self, notif, escalations, timeperiods):
          res = None
          now = time.time()
          cls = self.__class__
          notification_interval = self.notification_interval
          in_notif_time = time.time() - notif.creation_time
          for escalation_id in self.escalations:
              escalation = escalations[escalation_id]
              escalation_period = timeperiods[escalation.escalation_period]
              if escalation.is_eligible(notif.t_to_go, self.state, notif.notif_nb,
                                        in_notif_time, cls.interval_length, escalation_period):
                  if escalation.notification_interval != -1 and \
                          escalation.notification_interval < notification_interval:
                      notification_interval = escalation.notification_interval
          std_time = notif.t_to_go + notification_interval * cls.interval_length
          if std_time < now:
              std_time = now + notification_interval * cls.interval_length
          res = std_time
          creation_time = notif.creation_time
          in_notif_time = now - notif.creation_time
          for escalation_id in self.escalations:
              escalation = escalations[escalation_id]
              if escalation.get_name() not in notif.already_start_escalations:
                  escalation_period = timeperiods[escalation.escalation_period]
                  next_t = escalation.get_next_notif_time(std_time, self.state,
                                                          creation_time, cls.interval_length,
                                                          escalation_period)
                  if next_t is not None and now < next_t < res:
                      res = next_t
          return res