def import_dynamic(modname):
    if sys.version_info >= (3, 3):
        import importlib
        importlib.invalidate_caches()
    __import__(modname)
    return sys.modules[modname]


# From CPython
Import and return a module of the given name.  Care is taken to
dataset/ETHPy150Open numba/numba/numba/tests/support.py/import_dynamic