code: def test_solve_triangular_matrix(shape, chunk):
      rng = np.random.default_rng(1)
  
      A = rng.integers(1, 10, (shape, shape))
      b = rng.integers(1, 10, (shape, 5))
  
      # upper
      Au = np.triu(A)
      dAu = da.from_array(Au, (chunk, chunk))
      db = da.from_array(b, (chunk, 5))
      res = da.linalg.solve_triangular(dAu, db)
      assert_eq(res, scipy.linalg.solve_triangular(Au, b))
      assert_eq(dAu.dot(res), b.astype(float))
  
      # lower
      Al = np.tril(A)
      dAl = da.from_array(Al, (chunk, chunk))
      db = da.from_array(b, (chunk, 5))
      res = da.linalg.solve_triangular(dAl, db, lower=True)
      assert_eq(res, scipy.linalg.solve_triangular(Al, b, lower=True))
      assert_eq(dAl.dot(res), b.astype(float))
  
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 20 for calling a global function with example usage: test_solve_triangular_matrix(shape, chunk) without return types