pan class="c1">#</span>
                <span class="c1"># 1. Causal discovery and prediction</span>
                <span class="c1"># </span>

                <span class="c1"># Iterate over regimes</span>
                <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">num_regimes</span><span class="p">):</span>
                    <span class="k">if</span> <span class="bp">self</span><span class="o">.</spa