docstr: Returns one of various preconditioning matrices depending on the identifier
  `preconditioner' and the input matrix A whose inverse it supposedly
  approximates.
docstr_tok: ["Returns","one","of","various","preconditioning","matrices","depending","on","the","identifier","`","preconditioner","'","and","the","input","matrix","A","whose","inverse","it","supposedly","approximates","."]
code: def _fetch_preconditioner(self, preconditioner, A, rng=None):
      """
      Returns one of various preconditioning matrices depending on the identifier
      `preconditioner' and the input matrix A whose inverse it supposedly
      approximates.
      """
      if preconditioner == "identity":
          M = np.eye(A.shape[0], dtype=A.dtype)
      elif preconditioner == "random":
          if rng is None:
              rng = jtu.rand_default(self.rng())
          M = np.linalg.inv(rand_sym_pos_def(rng, A.shape, A.dtype))
      elif preconditioner == "exact":
          M = np.linalg.inv(A)
      else:
          M = None
      return M
  
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 1 for calling the LaxBackedScipyTests obj's underlying member method code with example usage: obj._fetch_preconditioner(preconditioner, A, rng) and returns: M