cy_spmm_tr for sparse matrix-matrix and trace, for use in expect