human
I wrote the below code

    def decorator(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            return_value = return_on_exception
            try:
                return_value = func(*args, **kwargs)
            except excepts as err:
                logger.warn(err.strerror)
                warnings.warn(err.strerror, warning)
            return return_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 catch_exception_and_warn(warning=Warning, return_on_exception=None, excepts=Exception):