class="n">mid_i</span><span class="p">]</span>
        <span class="n">mid_len</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">mid</span><span class="p">)</span>
        <span class="n">order</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">permutation</span><span class="p">(</span><span class="n">mid_len</span> <span class="o">-</span> <span class="mi">2</s