pan>
                <span class="c1"># print(res_sq.shape)</span>

                <span class="k">try</span><span class="p">:</span>
                    <span class="c1"># Optimization</span>
                    <span class="n">gamma_opt</span><span class="p">,</span> <span class="n">objective_opt</span> <span class="o">=</span> <span class="n">_optimize_gamma</span><span class="p">(</span><span class="n">res_sq</span><span class="p">,</span> <span class="n">max_transitions</span><span class="p">)</span>
