human
I wrote the below code

    def decorator(func):
        def get_default(func, args, kwargs):
            arg_names = inspect.getargspec(func).args[1:]
            default_position = (arg_names.index('default') if ('default' in arg_names) else None)
            if ((default_position is not None) and (default_position < len(args))):
                return args[default_position]
            else:
                return kwargs.get('default', UNDEFINED)
        if (not yields):
            @functools.wraps(func)
            def wrapped(self, *args, **kwargs):
                try:
                    return func(self, *args, **kwargs)
                except Exception as exc:
                    default = get_default(func, args, kwargs)
                    if (default == UNDEFINED):
                        raise exc
                    else:
                        return default
        else:
            @functools.wraps(func)
            def wrapped(self, *args, **kwargs):
                try:
                    for val in func(self, *args, **kwargs):
                        (yield val)
                except Exception as exc:
                    default = get_default(func, args, kwargs)
                    if (default == UNDEFINED):
                        raise exc
                    elif (default is not None):
                        for val in default:
                            (yield val)
        return wrapped
    return decorator

What's a good function header?

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

def with_default(yields=False):