
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Input to FunctionalGroupExtractor must be&quot;</span>
                             <span class="s2">&quot;str, Molecule, or MoleculeGraph.&quot;</span><span class="p">)</span>

        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">molgraph</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
            <