code: def test_inv(shape, chunk):
      rng = np.random.default_rng(1)
  
      A = rng.integers(1, 10, (shape, shape))
      dA = da.from_array(A, (chunk, chunk))
  
      res = da.linalg.inv(dA)
      assert_eq(res, scipy.linalg.inv(A), check_graph=False)
      assert_eq(
          dA.dot(res), np.eye(shape, dtype=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 24 for calling a global function with example usage: test_inv(shape, chunk) without return types