ss="p">]</span>

        <span class="k">if</span> <span class="n">val</span><span class="p">:</span>  
            <span class="k">if</span> <span class="n">type1</span> <span class="o">!=</span> <span class="n">type2</span><span class="p">:</span>
                <span class="n">pair_counts</span><span class="p">[</span><span class="n">type1</span><span class="p">,</span> <span class="n">type2</span><span class="p">]</span> <span class="o">+=</span> <span class="mi">1</span>
                <span class="n