def _lookup(module, name):
    val = module
    for i, identifier in enumerate(name):
        try: val = getattr(val, identifier)
        except __HOLE__:
            exc_msg = ('no variable named %s in %s' %
                       (identifier, '.'.join(name[:1+i])))
            raise ImportError(exc_msg)
    return val
dataset/ETHPy150Open CollabQ/CollabQ/vendor/epydoc/docintrospecter.py/_lookup