def METHOD_NAME(
    user_a,
    user_b,
    assert_permissionchangelog,
):
    group0, group1, group2 = GroupFactory.create_batch(size=3)
    added_groups = [group2]
    removed_groups = [group0]
    log_user_groups(user_a, user_b, (added_groups, removed_groups))
    changelog_entry0, changelog_entry1 = PermissionChangelog.objects.all()
    assert_permissionchangelog(
        changelog_entry0, PermissionChangelog.ActionType.ADDED, user_a, user_b, group2
    )
    assert_permissionchangelog(
        changelog_entry1, PermissionChangelog.ActionType.REMOVED, user_a, user_b, group0
    )