nt upwards, this is the same as </span>
            <span class="c1"># making sure the reverse of our tree is an arboresence.</span>

            <span class="k">if</span> <span class="ow">not</span> <span class="n">nx</span><span class="o">.</span><span class="n">is_arborescence</span><span class="p">(</span><span class="n">T</span><span class="o">.</span><span class="n">reverse</span><span class="p">()):</span>
                <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">