def import_string(import_name, silent=False):
    try:
        if ':' in import_name:
            module, obj = import_name.split(':', 1)
        elif '.' in import_name:
            module, obj = import_name.rsplit('.', 1)
        else:
            return __import__(import_name)
        try:
            return getattr(__import__(module, None, None, [obj]), obj)
        except (ImportError, AttributeError):
            # support importing modules not yet set up by the parent module
            # (or package for that matter)
            modname = module + '.' + obj
            try:
                __import__(modname)
            except ImportError as e:
                raise ImportError('Failed to import %s: %s' % (modname, e))
            return sys.modules[modname]
    except ImportError:
        if not silent:
            raise
Imports an object based on a string.  This is useful if you want to
dataset/ETHPy150Open aino/aino-utkik/utkik/utils.py/import_string