ass="p">[</span><span class="mi">1</span><span class="p">]</span>

        <span class="c1"># query_instance need no transformation for generating CFs using random sampling.</span>
        <span class="c1"># find the predicted value of query_instance</span>
        <span class="n">test_pred</span> <span class="o">=</span> <span class="n">model_predictions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
        <span class="k">if</span> <span class="bp">self</span><span class=