<s> from functools import wraps <EOL> def _create_method_wrapper ( fn ) : <EOL> @ wraps ( fn ) <EOL> def wrapper ( self , * args , ** kwargs ) : <EOL> return fn ( * args , ** kwargs ) <EOL> return wrapper <EOL> def callable_setting ( fn = None , takes_self = True ) : <EOL> def decorator ( fn ) : <EOL> if not takes_self : <EOL> fn = _create_method_wrapper ( fn ) <EOL> fn . is_callable_setting = True <EOL> return fn <EOL> if fn is None : <EOL> return decorator <EOL> else : <EOL> return decorator ( fn ) </s>
