code: def test_coalesce(dtype, device):
      row, col = tensor(
          [[0, 0, 0, 1, 1], [0, 1, 1, 0, 1]], torch.long, device
      )
      value = tensor([1, 1, 1, 3, 4], dtype, device)
      storage = SparseStorage(row=row, col=col, value=value)
  
      assert storage.row().tolist() == row.tolist()
      assert storage.col().tolist() == col.tolist()
      assert storage.value().tolist() == value.tolist()
  
      assert not storage.is_coalesced()
      storage = storage.coalesce()
      assert storage.is_coalesced()
  
      assert storage.row().tolist() == [0, 0, 1, 1]
      assert storage.col().tolist() == [0, 1, 0, 1]
      assert storage.value().tolist() == [1, 2, 3, 4]
  
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 5 for calling a global function with example usage: test_coalesce(dtype, device) without return types