code: func (n *Notifications) Filter(oldStatus, newStatus buildbucketpb.Status) Notifications {
  	notifications := n.GetNotifications()
  	filtered := make([]*Notification, 0, len(notifications))
  	for _, notification := range notifications {
  		if notification.ShouldNotify(oldStatus, newStatus) {
  			filtered = append(filtered, notification)
  		}
  	}
  	return Notifications{Notifications: filtered}
  }
docs: // Filter filters out Notification objects from Notifications by checking if we ShouldNotify
  // based on two build statuses.