human
I wrote the below code

    def wrap(self, name, value):
        old = self.get(name)
        f(self, name, value)
        if (not self.hasValidValue(name)):
            self._trch_set(name, old)
            raise exception.CmdErr, ("Invalid    value    for    '%s'    (%s)" % (name, value))
    return wrap

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def safesetparameter(f):