<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def post(self, request, format=None):
 """ validate password change operation and return result """

        serializer_class = self.get_serializer_class()
        serializer = serializer_class(data=request.data, instance=request.user)

        if serializer.is_valid():
            serializer.save()
            return Response({'detail': _(u'Password successfully changed')})

        return Response(serializer.errors, status=400)