def _load_level(handler, level, pathtable):
    """
    Loads level and builds appropriate type, handling softlinks if necessary
    """
    if isinstance(level, tables.link.SoftLink):
        # this is a link, so see if target is already loaded, return it
        pathname = level.target
        node = level()
    else:
        # not a link, but it might be a target that's already been
        # loaded ... if so, return it
        pathname = level._v_pathname
        node = level
    try:
        return pathtable[pathname]
    except __HOLE__:
        pathtable[pathname] = _load_nonlink_level(handler, node, pathtable,
                                                  pathname)
        return pathtable[pathname]
dataset/ETHPy150Open uchicago-cs/deepdish/deepdish/io/hdf5io.py/_load_level