pan><span class="n">graph</span><span class="p">[</span><span class="n">node</span><span class="p">]</span>
                <span 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="c1"># Add all associated hydrogens into the functional group</span>
                    <span class="k">if</span> <span class="n">neighbor</span> <span class="