_vertex</span><span class="p">]</span>
        <span class="k">if</span> <span class="n">return_as_df</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">M</span><span class="p">,</span><span class="n">col_labels</span><span class="p">,</span> <span class="n">col_labels</span><span class="p">)</span>
        <span class="k">else</span><span class="p">:</span>
        