<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_next_notification_time(self, notif, escalations, timeperiods):
 # pylint: disable=too-many-locals """Get the next notification time for a notification Take the standard notification_interval or ask for our escalation if one of them need a smaller value to escalade :param notif: Notification we need time :type notif: alignak.objects.notification.Notification :param escalations: Esclations objects, used to get escalation objects (interval, period) :type escalations: alignak.objects.escalation.Escalations :param timeperiods: Timeperiods objects, used to get escalation period :type timeperiods: alignak.objects.timeperiod.Timeperiods :return: Timestamp of next notification :rtype: int """

        res = None
        now = time.time()
        cls = self.__class__

        # Look at the minimum notification interval
        notification_interval = self.notification_interval
        # and then look for currently active notifications, and take notification_interval
        # if filled and less than the self value
        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

        # So take the by default time
        std_time = notif.t_to_go + notification_interval * cls.interval_length

        # Maybe the notification comes from retention data and
        # next notification alert is in the past
        # if so let use the now value instead
        if std_time < now:
            std_time = now + notification_interval * cls.interval_length

        # standard time is a good one
        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 the escalation was already raised, we do not look for a new "early start"
            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 we got a real result (time base escalation), we add it
                if next_t is not None and now < next_t < res:
                    res = next_t

        # And we take the minimum of this result. Can be standard or escalation asked
        return res