an class="k">for</span> <span class="n">neighbor</span> <span class="ow">in</span> <span class="n">neighbors</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
                            <span class="k">if</span> <span class="n">neighbor</span> <span class="ow">in</span> <span class="n">hydrogens</span><span class="p">:</span>
                                <span class="n">ring_group</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span clas