class="p">)</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Invalid type &quot;</span> <span class="o">+</span> <span class="n">item_type</span><span class="p">)</span>

    <span class="k">return</span> <span class="n">result</span>


<div class="viewcode-block" id="Timeline">
<a class="viewcode-back" href="../../../../../reference/python_api/api.html#xstudio.api.session.pl