def METHOD_NAME(
    users=None, participants=None, exclude_user=None
):
    users_ids = []
    if users:
        users_ids += [u.pk for u in users]
    if participants:
        users_ids += [p.user_id for p in participants]
    if exclude_user:
        users_ids = filter(lambda u: u != exclude_user.pk, users_ids)
    if not users_ids:
        return
    User.objects.filter(id__in=set(users_ids)).update(sync_unread_private_threads=True)