def import_class(module_name):

    module, klass = module_name.rsplit('.', 1)
    try:
        __import__(module)
    except ImportError:
        exc_type, exc_value, tb_root = sys.exc_info()
        logger.warning(exc_type)
        logger.warning(exc_value)
        tb = tb_root
        while tb is not None:
            if tb.tb_frame.f_globals.get('__name__') == module:
                raise exc_type, exc_value, tb_root
            tb = tb.tb_next
        return None
    return getattr(sys.modules[module], klass)
Import a module with a reasonable traceback and return that module as the
dataset/ETHPy150Open winhamwr/neckbeard/neckbeard/cloud_provisioners/base.py/import_class