def import_module_with_exceptions(name, package=None):
from timeside.core import _WITH_AUBIO, _WITH_YAAFE, _WITH_VAMP<EOL>if name.count('<STR_LIT>'):<EOL><INDENT>return<EOL><DEDENT>try:<EOL><INDENT>import_module(name, package)<EOL><DEDENT>except VampImportError:<EOL><INDENT>if _WITH_VAMP:<EOL><INDENT>raise VampImportError<EOL><DEDENT>else:<EOL><INDENT>return<EOL><DEDENT><DEDENT>except ImportError as e:<EOL><INDENT>if str(e).count('<STR_LIT>') and not _WITH_YAAFE:<EOL><INDENT>return<EOL><DEDENT>elif str(e).count('<STR_LIT>') and not _WITH_AUBIO:<EOL><INDENT>return<EOL><DEDENT>elif str(e).count('<STR_LIT>'):<EOL><INDENT>return<EOL><DEDENT>else:<EOL><INDENT>print (name, package)<EOL>raise e<EOL><DEDENT><DEDENT>return name<EOL>
Wrapper around importlib.import_module to import TimeSide subpackage
    and ignoring ImportError if Aubio, Yaafe and Vamp Host are not available