p">{}</span> <span class="c1"># [None] * num_regimes</span>
            <span class="n">objective_opt</span> <span class="o">=</span> <span class="mi">0</span>

            <span class="c1"># Difference between two consecutive optimizations</span>
            <span class="n">diff_g</span> <span class="o">=</span> <span class="p">[]</span>

            <span class="c1">#</span>
            <span class="c1"># Iteration over 1. causal discovery and 2. constrained optimization</span>
            <span class="c1