code: def test_solve_assume_a(shape, chunk):
      rng = np.random.default_rng(1)
  
      A = _get_symmat(shape)
      dA = da.from_array(A, (chunk, chunk))
  
      # vector
      b = rng.integers(1, 10, shape)
      db = da.from_array(b, chunk)
  
      res = da.linalg.solve(dA, db, assume_a="pos")
      assert_eq(
          res,
          _scipy_linalg_solve(A, b, assume_a="pos"),
          check_graph=False,
      )
      assert_eq(dA.dot(res), b.astype(float), check_graph=False)
  
      # tall-and-skinny matrix
      b = rng.integers(1, 10, (shape, 5))
      db = da.from_array(b, (chunk, 5))
  
      res = da.linalg.solve(dA, db, assume_a="pos")
      assert_eq(
          res,
          _scipy_linalg_solve(A, b, assume_a="pos"),
          check_graph=False,
      )
      assert_eq(dA.dot(res), b.astype(float), check_graph=False)
  
      # matrix
      b = rng.integers(1, 10, (shape, shape))
      db = da.from_array(b, (chunk, chunk))
  
      res = da.linalg.solve(dA, db, assume_a="pos")
      assert_eq(
          res,
          _scipy_linalg_solve(A, b, assume_a="pos"),
          check_graph=False,
      )
      assert_eq(dA.dot(res), b.astype(float), check_graph=False)
  
      with pytest.raises(
          FutureWarning, match="sym_pos keyword is deprecated"
      ):
          res = da.linalg.solve(dA, db, sym_pos=True)
          assert_eq(
              res,
              _scipy_linalg_solve(A, b, assume_a="pos"),
              check_graph=False,
          )
          assert_eq(dA.dot(res), b.astype(float), check_graph=False)
  
      with pytest.raises(
          FutureWarning, match="sym_pos keyword is deprecated"
      ):
          res = da.linalg.solve(dA, db, sym_pos=False)
          assert_eq(
              res,
              _scipy_linalg_solve(A, b, assume_a="gen"),
              check_graph=False,
          )
          assert_eq(dA.dot(res), b.astype(float), check_graph=False)
  
imports: from __future__ import annotations
  import sys
  import pytest
  import numpy
  import scipy.linalg
  from packaging.version import parse
  import dask.array
  from dask.array.linalg import qr, sfqr, svd, svd_compressed, tsqr
  from dask.array.numpy_compat import _np_version
  from dask.array.utils import assert_eq, same_keys, svd_flip
label_desc: Use image node_id 27 for calling a global function with example usage: test_solve_assume_a(shape, chunk) without return types