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 KeyError:
        pathtable[pathname] = _load_nonlink_level(handler, node, pathtable,
                                                  pathname)
        return pathtable[pathname]
def _load_level ( handler , level , pathtable ) : if isinstance ( level , tables . link . SoftLink ) : pathname = level . target node = level ( ) else : pathname = level . _v_pathname node = level try : return pathtable [ pathname ] except KeyError : pathtable [ pathname ] = _load_nonlink_level ( handler , node , pathtable , pathname ) return pathtable [ pathname ]
Loads level and builds appropriate type, handling softlinks if necessary