">]</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">image_i</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">comp_j</span><span class="p">,</span> <span class="n">image_j</span> <span class="ow">in</span> <span class="n">connected_sites</span><span class="p">[</span><span class="n">comp_i</span><span class="p">]:</span>

            <span class="n">image_j</span> <span class="o">=</span> <span class="nb">tuple</span><span clas