span>
            <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">input_dims</span><span class="p">)</span> <span class="o">==</span> <span class="mi">2</span><span class="p">,</span> <span class="s2">&quot;Difference operation requires that there should be two inputs&quot;</span>

        <span class="k">if</span> <span class="s2">&quot;difference&quot;</span> <span class="ow">in</span> <span class="bp">sel