code: def test_splu(matrices):
      A_dense, A_sparse, b = matrices
      n = len(b)
      sparse_cls = type(A_sparse)
  
      lu = splin.splu(A_sparse)
  
      assert isinstance(lu.L, sparse_cls)
      assert isinstance(lu.U, sparse_cls)
  
      Pr = sparse_cls(
          sp.csc_matrix((np.ones(n), (lu.perm_r, np.arange(n))))
      )
      Pc = sparse_cls(
          sp.csc_matrix((np.ones(n), (np.arange(n), lu.perm_c)))
      )
      A2 = Pr.T @ lu.L @ lu.U @ Pc.T
  
      assert_allclose(A2.todense(), A_sparse.todense())
  
      z = lu.solve(A_sparse.todense())
      assert_allclose(z, np.eye(n), atol=1e-10)
  
imports: import pytest
  import numpy
  import scipy.sparse
  import scipy.sparse.linalg
  from numpy.testing import assert_allclose
label_desc: Use image node_id 12 for calling a global function with example usage: test_splu(matrices) without return types