an class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">anc_v</span><span class="p">)</span>

        <span class="c1"># Get the vertex with the minimum function value</span>
        <span class="k">return</span> <span class="nb">min</span><span class="p">(</span><span class="n">common_anc</span><span class="p">,</span> <span class="n">key</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="bp">se