pan>
    <span class="k">if</span> <span class="n">levels</span> <span class="o">&lt;</span> <span class="mi">1</span><span class="p">:</span>
        <span class="n">levels</span> <span class="o">=</span> <span class="mi">1</span>

    <span class="n">table</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
    <span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="n">series</span> <s