pan> <span class="n">vertex</span> <span class="o">==</span> <span class="s1">&#39;v_inf&#39;</span><span class="p">:</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;You cannot remove the infinite node&quot;</span><span class="p">)</span>
        
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">down_degree</span><span class="p">(</span><span class="n">vertex</span><span clas