def import_string(import_name, silent=False):
    import_name = str(import_name)
    try:
        if '.' in import_name:
            module, obj = import_name.rsplit('.', 1)
            return getattr(__import__(module, None, None, [obj]), obj)
        else:
            return __import__(import_name)
    except (ImportError, AttributeError):
        if not silent:
            raise
Imports an object based on a string. If *silent* is True the return
dataset/ETHPy150Open disqus/nydus/nydus/utils.py/import_string