code: def test_spsolve(matrices):
      A_dense, A_sparse, b = matrices
      b2 = np.random.rand(len(b), 3)
  
      x0 = splin.spsolve(sp.csc_matrix(A_dense), b)
      x = splin.spsolve(A_sparse, b)
      assert isinstance(x, np.ndarray)
      assert_allclose(x, x0)
  
      x0 = splin.spsolve(sp.csc_matrix(A_dense), b)
      x = splin.spsolve(A_sparse, b, use_umfpack=True)
      assert isinstance(x, np.ndarray)
      assert_allclose(x, x0)
  
      x0 = splin.spsolve(sp.csc_matrix(A_dense), b2)
      x = splin.spsolve(A_sparse, b2)
      assert isinstance(x, np.ndarray)
      assert_allclose(x, x0)
  
      x0 = splin.spsolve(sp.csc_matrix(A_dense), sp.csc_matrix(A_dense))
      x = splin.spsolve(A_sparse, A_sparse)
      assert isinstance(x, type(A_sparse))
      assert_allclose(x.toarray(), x0.toarray())
  
imports: import pytest
  import numpy
  import scipy.sparse
  import scipy.sparse.linalg
  from numpy.testing import assert_allclose, assert_equal
label_desc: Use image node_id 12 for calling a global function with example usage: test_spsolve(matrices) without return types