<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, key_vals=None, overwrite=True):
 """Locked keys will be overwritten unless overwrite=False. Otherwise, written keys will be added to the "locked" list. """

        if not key_vals:
            return
        write_items = self._update(key_vals, overwrite)
        self._root._root_set(self._path, write_items)
        self._root._write(commit=True)