'Adds new notification to the set.
There can be only one notification of particular type (info, warning,
error) in the set. Notifications are guaranteed to be stored in the
order of their priority.
Args:
new_notification: New notification to add.'

def AddNotification(self, new_notification):

    current_list = [notification for notification in self.notifications if (notification.type != new_notification.type)]
    current_list.append(new_notification)
    current_list = sorted(current_list, key=(lambda x: x.type))
    self.notifications = current_list
