>site_j</span><span class="o">.</span><span class="n">index</span><span class="p">,</span> <span class="n">site_j</span><span class="o">.</span><span class="n">jimage</span><span class="p">,</span> <span class="n">site_j</span><span class="o">.</span><span class="n">site</span><span class="p">))</span>

    <span class="c1"># sort the list of indices and the graph by index to make consistent</span>
    <span class="n">indices_ordering</span> <span class="o">=</span> <span class="n">np</span><span class="o">