def change_password(self):
        from django.contrib.auth import authenticate as auth_authenticate

        if self.initial_data not in 'password':
            raise ValidationError("Current password needs to be provided")
        user = auth_authenticate(username=self.instance.username, password=self.initial_data['password'])
        if user is not None:
            self.instance.set_password(self.initial_data['password1'])
            self.instance.save()
        else:
            raise ValidationError("Old password is incorrect.")
dataset/ETHPy150Open crowdresearch/crowdsource-platform/crowdsourcing/serializers/user.py/UserSerializer.change_password/swapped operands of `not in`