n class="k">else</span><span class="p">:</span>
        <span class="n">fig</span><span class="o">.</span><span class="n">clear</span><span class="p">()</span>
        <span class="n">plt</span><span class="o">.</span><span class="n">close</span><span class="p">(</span><span class="n">fig</span><span class="p">)</span>

    <span class="k">return</span> <span class="n">results</span>


<span class="n">my_model</span><span class="o">.</span><span class="n">eval_custom_function</span> <span class="o">=</span>