an class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Add a new vertex named `w` at function value `f_w` by subdividing the edge (u,v) and label it. </span>

<span class="sd">        &quot;&quot;&quot;</span>

        <span class="c1"># Add the vertex </span>
        <span class="bp">self</span><span class="o">.</span><span class="n">subdivide_edge</span><span class="p">(</span><span class="n">u</span><span class="p">,</span> <span class="n