    
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">up_degree</span><span class="p">(</span><span class="n">lowerVertex</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Edge (</span><span class="si">{</span><span class="n">u</span><span class="p">,</