code: def test_from_spmatrix():
      t = tensor(
          sps.csr_matrix([[0, 0, 1], [1, 0, 0]], dtype="f8"),
          chunk_size=2,
      )
  
      assert isinstance(t, SparseTensor)
      assert isinstance(t.op, CSRMatrixDataSource)
      assert t.issparse() is True
      assert not t.op.gpu
  
      t = tile(t)
      assert t.chunks[0].index == (0, 0)
      assert isinstance(t.op, CSRMatrixDataSource)
      assert not t.op.gpu
      m = sps.csr_matrix([[0, 0], [1, 0]])
      assert np.array_equal(t.chunks[0].op.indices, m.indices) is True
      assert np.array_equal(t.chunks[0].op.indptr, m.indptr) is True
      assert np.array_equal(t.chunks[0].op.data, m.data) is True
      assert np.array_equal(t.chunks[0].op.shape, m.shape) is True
  
imports: import shutil
  import tempfile
  from copy import copy
  import numpy
  import scipy.sparse
  import pytest
  from ....None import dataframe
  from ....core import enter_mode, tile
  from ...None import ones, zeros, tensor, full, arange, diag, linspace, triu, tril, ones_like
  from ...core import Tensor, SparseTensor
  from ..None import array, fromtiledb, TensorTileDBDataSource, fromdense, asarray, ascontiguousarray, asfortranarray
  from ..tri import TensorTriu, TensorTril
  from ..zeros import TensorZeros
  from ..from_dense import DenseToSparse
  from ..array import CSRMatrixDataSource
  from ..ones import TensorOnes, TensorOnesLike
  from ..from_dataframe import from_dataframe
label_desc: Use image node_id 13 for calling a global function with example usage: test_from_spmatrix() without return types