def METHOD_NAME(cls, info: ResolveInfo, instance, data, **kwargs):
    user = info.context.user
    user = cast(models.User, user)
    # check if user can manage this user
    if not user.is_superuser and get_out_of_scope_users(user, [instance]):
        msg = "You can't manage this user."
        code = AccountErrorCode.OUT_OF_SCOPE_USER.value
        raise ValidationError({"id": ValidationError(msg, code=code)})
    error = check_for_duplicates(data, "add_groups", "remove_groups", "groups")
    if error:
        error.code = AccountErrorCode.DUPLICATED_INPUT_ITEM.value
        raise error
    cleaned_input = super().METHOD_NAME(info, instance, data, **kwargs)
    return cleaned_input