def METHOD_NAME(repost_notifications, save_notifications):
    deduped_notifications_by_group_id = []
    existing_group_ids = set(
        [repost_notification.group_id for repost_notification in repost_notifications]
    )
    deduped_notifications_by_group_id = repost_notifications + [
        save_notif
        for save_notif in save_notifications
        if save_notif.group_id not in existing_group_ids
    ]
    return deduped_notifications_by_group_id