@contextlib.contextmanager<EOL>def _ignore_deprecated_imports(ignore=True):
if ignore:<EOL><INDENT>with warnings.catch_warnings():<EOL><INDENT>warnings.filterwarnings("<STR_LIT:ignore>", "<STR_LIT>",<EOL>DeprecationWarning)<EOL>yield<EOL><DEDENT><DEDENT>else:<EOL><INDENT>yield<EOL><DEDENT>
Context manager to suppress package and module deprecation
    warnings when importing them.

    If ignore is False, this context manager has no effect.