def METHOD_NAME(self, request: Request, *args, **kwargs) -> Response:
    instance: User = self.get_object()
    serializer = self.get_serializer(instance=instance, data=request.data)
    serializer.is_valid(raise_exception=True)
    groups = [{"id": group.pk} for group in serializer.validated_data.pop("groups", [])]
    user: User = update_user(
        user=serializer.instance,
        context_user=request.user,
        partial=True,
        need_current_password=not request.user.is_superuser,
        api_v2_behaviour=True,
        groups=groups,
        **serializer.validated_data,
    )
    return Response(data=UserSerializer(instance=user).data, status=HTTP_200_OK)