def _ignore_warnings(fn):
@wraps(fn)<EOL>def wrapper(*args, **kwargs):<EOL><INDENT>clean_warning_registry()<EOL>with warnings.catch_warnings(record=True) as w:<EOL><INDENT>warnings.simplefilter('<STR_LIT>')<EOL>return fn(*args, **kwargs)<EOL>w[:] = []<EOL><DEDENT><DEDENT>return wrapper<EOL>
Decorator to catch and hide warnings without visual nesting