pan><span class="n">ts</span><span class="p">,</span> <span class="n">n</span> <span class="o">=</span> <span class="mi">6</span><span class="p">)</span> <span class="c1">#adjacency matrix</span>
<span class="n">A</span> <span class="o">=</span> <span class="n">remove_zeros</span><span class="p">(</span><span class="n">A</span><span class="p">)</span> <span class="c1">#remove nodes of unused permutation</span>
<span class="n">G</span> <span class="o">=</span> <span class="n">nx</span><span class="o">.</span