oup</span><span class="p">))</span><span class="o">.</span><span class="n">to_undirected</span><span class="p">()</span>
                <span class="k">for</span> <span class="n">other</span> <span class="ow">in</span> <span class="n">categories</span><span class="p">[</span><span class="n">smiles</span><span class="p">][</span><span class="s2">&quot;groups&quot;</span><span class="p">]:</span>
                    <span class="n">other_subgraph</span> <span class="o">=</span> <span class="bp">self</span><s