dimensions.
  * **dense_dim** (*int**, **optional*) -- Number of dense
    dimensions of the resulting CSR, CSC, BSR or BSC tensor.  This
    argument should be used only if "self" is a strided tensor,
    and must be a value between 0 and dimension of "self" tensor
    minus two.

Example:
  >>> x = torch.tensor([[1, 0], [0, 0], [2, 3]])
  >>> x.to_sparse(layout=torch.sparse_coo)
  tensor(indices=tensor([[0, 2, 2],
                         [0, 0, 1]]),
         values=tensor([1, 2, 3]),
         size=(3, 2), nnz=3, layout=torch.sparse_coo)
  >>> x.to_sparse(layout=torch.sparse_bsr, blocksize=(1, 2))
  tensor(crow_indices=tensor([0, 1, 1, 2]),
         col_indices=tensor([0, 0]),
         values=tensor([[[1, 0]],
                        [[2, 3]]]), size=(3, 2), nnz=2, layout=torch.sparse_bsr)
  >>> x.to_sparse(layout=torch.sparse_bsr, blocksize=(2, 1))
  RuntimeError: Tensor size(-2) 3 needs to be divisible by blocksize[0] 2
