def import_module(name, deprecated=False):
with _ignore_deprecated_imports(deprecated):<EOL><INDENT>try:<EOL><INDENT>return importlib.import_module(name)<EOL><DEDENT>except ImportError as msg:<EOL><INDENT>raise unittest.SkipTest(str(msg))<EOL><DEDENT><DEDENT>
Import and return the module to be tested, raising SkipTest if
    it is not available.

    If deprecated is True, any module or package deprecation messages
    will be suppressed.