pan class="o">.</span><span class="n">molgraph</span><span class="o">.</span><span class="n">graph</span><span class="o">.</span><span class="n">subgraph</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">other</span><span class="p">))</span><span class="o">.</span><span class="n">to_undirected</span><span class="p">()</span>

                    <span class="k">if</span> <span class="ow">not</span> <span class="n">nx</span><span class="o">.</span><span class="