def ignore_warning(warning):
def decorator(func):<EOL><INDENT>"""<STR_LIT>"""<EOL>@wraps(func)<EOL>def wrapper(*args, **kwargs):<EOL><INDENT>"""<STR_LIT>"""<EOL>warnings.simplefilter('<STR_LIT:ignore>', warning)<EOL>return func(*args, **kwargs)<EOL><DEDENT>return wrapper<EOL><DEDENT>return decorator<EOL>
Ignore any emitted warnings from a function.

:param warning: The category of warning to ignore.