span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">protein_keys</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">model</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">proteins_to_shapemers</span> <span class="o">=</span> <span class="p">{</span><span class="n">k</span><span class="p">:</span> <span class="n">invariants</span><span class="p">[</span><span class="n">k</