code: def test_cg_as_solve(self, shape, dtype):
      rng = jtu.rand_default(self.rng())
      a = rng(shape, dtype)
      b = rng(shape[:1], dtype)
  
      expected = np.linalg.solve(posify(a), b)
      actual = lax_cg(posify(a), b)
      self.assertAllClose(expected, actual, atol=1e-5, rtol=1e-5)
  
      actual = jit(lax_cg)(posify(a), b)
      self.assertAllClose(expected, actual, atol=1e-5, rtol=1e-5)
  
      # numerical gradients are only well defined if ``a`` is guaranteed to be
      # positive definite.
      jtu.check_grads(
          lambda x, y: lax_cg(posify(x), y), (a, b), order=2, rtol=2e-1
      )
  
imports: from functools import partial
  import unittest
  from absl.testing import absltest
  import numpy
  import scipy.sparse.linalg
  import jax
  import jax.numpy
  import jax.scipy.sparse.linalg
  from jax import jit
  from jax import lax
  from jax.tree_util import register_pytree_node_class
  import jax._src.scipy.sparse.linalg
  from jax._src import config
  from jax._src import dtypes
  from jax._src import test_util
label_desc: Use image node_id 3 for calling the LaxBackedScipyTests obj's underlying member method code with example usage: obj.test_cg_as_solve(shape, dtype) without return types