def ensure_configured(func):
@functools.wraps(func)<EOL>def wrapper(*args, **kwargs):<EOL><INDENT>if len(logging.root.handlers) == <NUM_LIT:0>:<EOL><INDENT>basicConfig()<EOL><DEDENT>return func(*args, **kwargs)<EOL><DEDENT>return wrapper<EOL>
Modify a function to call ``basicConfig`` first if no handlers exist.