code: def test_sparse_reshape(dtype, device):
      row, col = tensor(
          [[0, 1, 2, 3], [0, 1, 2, 3]], torch.long, device
      )
      storage = SparseStorage(row=row, col=col)
  
      storage = storage.sparse_reshape(2, 8)
      assert storage.sparse_sizes() == (2, 8)
      assert storage.row().tolist() == [0, 0, 1, 1]
      assert storage.col().tolist() == [0, 5, 2, 7]
  
      storage = storage.sparse_reshape(-1, 4)
      assert storage.sparse_sizes() == (4, 4)
      assert storage.row().tolist() == [0, 1, 2, 3]
      assert storage.col().tolist() == [0, 1, 2, 3]
  
      storage = storage.sparse_reshape(2, -1)
      assert storage.sparse_sizes() == (2, 8)
      assert storage.row().tolist() == [0, 0, 1, 1]
      assert storage.col().tolist() == [0, 5, 2, 7]
  
file_path: pytorch_sparse/test/test_storage.py
imports: from itertools import product
  import pytest
  import torch
  from torch_sparse.storage import SparseStorage
  from torch_sparse.testing import devices, dtypes, tensor
label_desc: Use image node_id 6 for calling a global function with example usage: test_sparse_reshape(dtype, device) without return types