an><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
                        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;***** Break k-loop of regimes *****</span><span class="se">\n</span><span class="s2"> &quot;</span><span class="p">)</span>
                        <span class="k">break</span>  <span class="c1"># from k-loop</span>


                    <span class="c1"># Get residuals</span>
                    <span class="n">residuals</spa