<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_with(self, **query):
 """ secure update, mass assignment protected """

        for k, v in self._filter_attrs(query).items():
            setattr(self, k, v)
        return self.save()