code: def test_ind2ptr(device):
      row = tensor([2, 2, 4, 5, 5, 6], torch.long, device)
      rowptr = torch.ops.torch_sparse.ind2ptr(row, 8)
      assert rowptr.tolist() == [0, 0, 0, 2, 2, 3, 5, 6, 6]
  
      row = torch.ops.torch_sparse.ptr2ind(rowptr, 6)
      assert row.tolist() == [2, 2, 4, 5, 5, 6]
  
      row = tensor([], torch.long, device)
      rowptr = torch.ops.torch_sparse.ind2ptr(row, 8)
      assert rowptr.tolist() == [0, 0, 0, 0, 0, 0, 0, 0, 0]
  
      row = torch.ops.torch_sparse.ptr2ind(rowptr, 0)
      assert row.tolist() == []
  
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 1 for calling a global function with example usage: test_ind2ptr(device) without return types