{%- extends 'python/index.py.j2' -%}

{% block header %}
"""
{%- for cell in nb.cells -%}
{%- if "docstring" in cell.metadata.tags -%}
{{ cell.source | escape_triple_quotes }}
{% endif -%}
{%- endfor -%}
"""
{% endblock header %}

{# Don't render docstring twice #}
{%- block any_cell scoped -%}
{%- if "docstring" not in cell.metadata.tags -%}
{{ super() }}
{%- endif -%}
{%- endblock any_cell -%}