<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, **kwargs):
 """Update fields on the model. :param kwargs: The model attribute values to update the model with. """

        self.validate(**kwargs)
        for attr, value in kwargs.items():
            setattr(self, attr, value)
        return self