def get_nav():
    global _nav_cache
    global _nav_lock
    with _nav_lock:
        if (_nav_cache is not None):
            nav = _nav_cache
        else:
            nav = get_nav_impl()
        nav = copy.deepcopy(nav)
        if build_mode:
            _nav_cache = copy.deepcopy(nav)
    process_nav(request.path, nav)
    return nav
def get_nav():
    global _nav_cache
    global _nav_lock
    with _nav_lock:
        if (_nav_cache is not None):
            nav = _nav_cache
        else:
            nav = get_nav_impl()
        nav = copy.deepcopy(nav)
        if build_mode:
            _nav_cache = copy.deepcopy(nav)
    process_nav(request.path, nav)
    return nav