def deprecated_option(option_name, message=''):
    ''' Marks an option as deprecated. '''
    def caller(func, *args, **kwargs):
        if option_name in kwargs:
            warnings.warn(
                '{} is deprecated. {}'.format(option_name, message),
                DeprecationWarning,
                stacklevel=3
            )
            
        return func(*args, **kwargs)
    return decorator(caller)
Marks an option as deprecated.