an class="o">=</span> <span class="nb">set</span><span class="p">()</span>
    <span class="n">seen_comp_vertices</span> <span class="o">=</span> <span class="n">defaultdict</span><span class="p">(</span><span class="nb">set</span><span class="p">)</span>

    <span class="n">queue</span> <span class="o">=</span> <span class="p">[(</span><span class="n">site_index</span><span class="p">,</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p"