code: def matrices(sparse_cls):
      np.random.seed(1234)
      A_dense = np.random.rand(9, 9)
      A_dense = A_dense @ A_dense.T
      A_sparse = sparse_cls(A_dense)
      b = np.random.rand(9)
      return A_dense, A_sparse, b
  
imports: import pytest
  import numpy
  import scipy.sparse
  import scipy.sparse.linalg
  from numpy.testing import assert_allclose
label_desc: Use image node_id 4 for calling a global function with example usage: matrices(sparse_cls) and returns: A_dense,  A_sparse,  b