">0</span><span class="p">)</span>

        <span class="k">if</span> <span class="p">(</span><span class="n">comp_i</span><span class="p">,</span> <span class="n">image_i</span><span class="p">)</span> <span class="ow">in</span> <span class="n">seen_vertices</span><span class="p">:</span>
            <span class="k">continue</span>
        <span class="n">seen_vertices</span><span class="o">.</span><span class="n">add</span><span class="p">((</span><span class="n">comp_i</span><span class="p">,</span> <spa