/span>
            <span class="k">if</span> <span class="nb">sum</span><span class="p">(</span><span class="n">validity</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
                <span class="n">rows_to_add</span> <span class="o">=</span> <span class="n">candidate_cfs</span><span class="p">[</span><span class="n">validity</span> <span class="o">==</span> <span class="mi">1</span><span class="p">]</span>

                <span class="k">if</s