 class="sd">        (MoleculeGraph): A MoleculeGraph object of the component.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="kn">import</span> <span class="nn">networkx</span> <span class="k">as</span> <span class="nn">nx</span>
    <span class="n">seen_indices</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="n">sites</span> <span class="o">=</span> <span class="p">[]</span>

    <span class="n">start_index</span> <span class="o">=</span> <span class="nb">li