span class="n">nx</span><span class="o">.</span><span class="n">Graph</span><span
            class="p">()</span>
    <span class="n">set_edge</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span>

    <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="nb">list</span><span
            class="p">(</span><span class="n">a_l</span><span class="o">.</span><span class="n">keys</span><span
            class="p">())[</span><span class="mi">0</s