pan class="c1"># Determine the average number of samples for a given classes (that aren't "unknown" or "empty")</span>
    <span class="n">n_classes</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">classes</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">add_unknown_class</span><span class="p">:</span>
        <span class="n">n_classes</span> <span class="o">-=</span> <span class="mi">1</span>
    <span class="k">if</span> <span c