The sparse constant provides a constant tensor in coordinate format. We first split the sparse constant into a constant tensor for indices and a constant tensor for values. We then generate a loop to fill a sparse tensor in coordinate format using the tensors for the indices and the values. Finally, we convert the sparse tensor in coordinate format to the destination sparse tensor format.
Add tests.
this method leaves the insertion point in the if val != 0
for subsequent code addition
Probably something to document in the comment at L198
(ie. both the generation of the if as well as the post-condition on the insertion point)