d</span><span class="p">,</span> <span class="n">n</span> <span class="o">=</span> <span class="n">A</span><span class="o">.</span><span class="n">shape</span>
        <span class="k">if</span> <span class="n">nnz</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">nnz</span> <span class="o">=</span> <span class="n">n</span>
        <span class="n">x</span> <span class="o">=</span> <span class="n">torch</span><span class="o">.</span><span class=