code: def test_torch_sparse_csc_conversion(indptr, indices, shape):
      dev = F.ctx()
      indptr = torch.tensor(indptr).to(dev)
      indices = torch.tensor(indices).to(dev)
      torch_sparse_shape = shape
      val_shape = (indices.shape[0],)
      val = torch.randn(val_shape).to(dev)
      torch_sparse_csc = torch.sparse_csc_tensor(
          indptr, indices, val, torch_sparse_shape
      )
      spmat = from_torch_sparse(torch_sparse_csc)
  
      def _assert_spmat_equal_to_torch_sparse_csc(
          spmat, torch_sparse_csc
      ):
          indptr, indices, value_indices = spmat.csc()
          assert torch_sparse_csc.layout == torch.sparse_csc
          assert value_indices is None
          # Use .data_ptr() to check whether indices and values are on the same
          # memory address
          assert (
              indptr.data_ptr()
              == torch_sparse_csc.ccol_indices().data_ptr()
          )
          assert (
              indices.data_ptr()
              == torch_sparse_csc.row_indices().data_ptr()
          )
          assert (
              spmat.val.data_ptr()
              == torch_sparse_csc.values().data_ptr()
          )
          assert spmat.shape == torch_sparse_csc.shape[:2]
  
      _assert_spmat_equal_to_torch_sparse_csc(spmat, torch_sparse_csc)
      torch_sparse_csc = to_torch_sparse_csc(spmat)
      _assert_spmat_equal_to_torch_sparse_csc(spmat, torch_sparse_csc)
  
imports: import unittest
  import warnings
  import backend
  import pytest
  import torch
  from dgl.sparse import diag, from_coo, from_csc, from_csr, from_torch_sparse, identity, to_torch_sparse_coo, to_torch_sparse_csc, to_torch_sparse_csr, val_like
  from .utils import rand_coo, rand_csc, rand_csr, rand_diag, sparse_matrix_to_dense
label_desc: Use image node_id 27 for calling a global function with example usage: test_torch_sparse_csc_conversion(indptr, indices, shape) without return types