pan class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="mi">2</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>

    <span class="c1"># Generate unique pairs</span>
    <span class="c1"># find idx1 and idx2</span>
    <span class="n">idx1</span> <span class="o">=</span> <span class="n">np</span><span c