human
I wrote the below code

    def decorator(func):
        def resetter_attr(saved_value_internal):
            return setattr(namespace, name, saved_value_internal)
        def resetter_no_attr(saved_value_internal):
            del saved_value_internal
            return delattr(namespace, name)
        def wrapper(*args, **kwargs):
            saved_value = None
            try:
                saved_value = getattr(namespace, name)
                resetter = resetter_attr
            except AttributeError:
                resetter = resetter_no_attr
            try:
                return func(*args, **kwargs)
            finally:
                resetter(saved_value)
        return wrapper
    return decorator

What's a good function header?

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

def preserve_value(namespace, name):