       <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          {% block menu %}
            {% set toctree = toctree(maxdepth=4, collapse=theme_collapse_navigation, includehidden=True) %}
            {% if toctree %}
                {{ toctree }}
            {% else %}
                <!-- Local TOC -->
                <div class="local-toc">{{ toc }}</div>
            {% endif %}
          {% endblock %}
        </div>
      </div>
    </nav>

    <s