code: def test_check_array_accept_sparse_no_exception():
      X = [[1, 2], [3, 4]]
      X_csr = sp.csr_matrix(X)
  
      array = check_array(X_csr, accept_sparse=True)
      assert isinstance(array, Tensor)
      assert array.issparse() is True
  
imports: from itertools import product
  import numpy
  import pytest
  import scipy.sparse
  from sklearn.utils.estimator_checks import _NotAnArray
  from sklearn.utils._mocking import MockDataFrame
  from sklearn.utils._testing import assert_raise_message, assert_raises_regex
  from ....None import tensor
  from ....None import dataframe
  from ....tensor.core import Tensor
  from ..validation import check_array, check_consistent_length
label_desc: Use image node_id 6 for calling a global function with example usage: test_check_array_accept_sparse_no_exception() without return types