<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scatter_master_notifications(self):
 """Generate children notifications from a master notification Also update notification number Master notification are raised when a notification must be sent out. They are not launched by reactionners (only children are) but they are used to build the children notifications. From one master notification, several children notifications may be built, :return: None """

        now = time.time()
        # We only want the master scheduled notifications that are immediately launchable
        notifications = [a for a in self.actions.values()
                         if a.is_a == u'notification' and a.status == ACT_STATUS_SCHEDULED
                         and not a.contact and a.is_launchable(now)]
        if notifications:
            logger.debug("Scatter master notification: %d notifications",
                         len(notifications))
        for notification in notifications:
            logger.debug("Scheduler got a master notification: %s", notification)

            # This is a "master" notification created by an host/service.
            # We use it to create children notifications (for the contacts and
            # notification_commands) which are executed in the reactionner.
            item = self.find_item_by_id(notification.ref)
            children = []
            notification_period = None
            if getattr(item, 'notification_period', None) is not None:
                notification_period = self.timeperiods[item.notification_period]
            if not item.is_blocking_notifications(notification_period,
                                                  self.hosts, self.services,
                                                  notification.type, now):
                # If it is possible to send notifications
                # of this type at the current time, then create
                # a single notification for each contact of this item.
                children = item.scatter_notification(
                    notification, self.contacts, self.notificationways, self.timeperiods,
                    self.macromodulations, self.escalations,
                    self.find_item_by_id(getattr(item, "host", None))
                )
                for notif in children:
                    logger.debug(" - child notification: %s", notif)
                    notif.status = ACT_STATUS_SCHEDULED
                    # Add the notification to the scheduler objects
                    self.add(notif)

            # If we have notification_interval then schedule
            # the next notification (problems only)
            if notification.type == u'PROBLEM':
                # Update the ref notif number after raise the one of the notification
                if children:
                    # notif_nb of the master notification
                    # was already current_notification_number+1.
                    # If notifications were sent,
                    # then host/service-counter will also be incremented
                    item.current_notification_number = notification.notif_nb

                if item.notification_interval and notification.t_to_go is not None:
                    # We must continue to send notifications.
                    # Just leave it in the actions list and set it to "scheduled"
                    # and it will be found again later
                    # Ask the service/host to compute the next notif time. It can be just
                    # a.t_to_go + item.notification_interval*item.__class__.interval_length
                    # or maybe before because we have an
                    # escalation that need to raise up before
                    notification.t_to_go = item.get_next_notification_time(notification,
                                                                           self.escalations,
                                                                           self.timeperiods)

                    notification.notif_nb = item.current_notification_number + 1
                    logger.debug("Repeat master notification: %s", notification)
                else:
                    # Wipe out this master notification. It is a master one
                    item.remove_in_progress_notification(notification)
                    logger.debug("Remove master notification (no repeat): %s", notification)
            else:
                # Wipe out this master notification.
                logger.debug("Remove master notification (no more a problem): %s", notification)
                # We don't repeat recover/downtime/flap/etc...
                item.remove_in_progress_notification(notification)