n class="nf">compute_order</span><span class="p">(</span>
        <span class="n">df</span><span class="p">,</span>
        <span class="n">optimal</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
        <span class="n">dist_method</span><span class="o">=</span><span class="s2">&quot;euclidean&quot;</span><span class="p">,</span>
        <span class="n">cluster_method</span><span class="o">=</span><span class="s2">&quot;average&quot;</span>
<span class="p">):</span>
    <s