>
            <span class="n">neighbors_choices</span> <span class="o">=</span> <span class="n">neighbors</span><span class="p">[</span><span class="n">z_choice_index</span><span class="p">][</span><span class="n">neighbors</span><span class="p">[</span><span class="n">z_choice_index</span><span class="p">]</span> <span class="o">&gt;</span> <span class="o">-</span><span class="mi">1</span><span class="p">]</span>
            <span class="c1"># Shuffle neighbors in-place to randomize the choice of indices</