code: def test_tril_triu():
      A = cupy.random.default_rng().standard_normal((20, 20))
      for chk in [5, 4]:
          dA = da.from_array(A, (chk, chk), asarray=False)
  
          assert_eq(da.triu(dA), np.triu(A))
          assert_eq(da.tril(dA), np.tril(A))
  
          for k in [-25, -20, -9, -1, 1, 8, 19, 21]:
              assert_eq(da.triu(dA, k), np.triu(A, k))
              assert_eq(da.tril(dA, k), np.tril(A, k))
  
file_path: dask/dask/array/tests/test_cupy_routines.py
imports: from __future__ import annotations
  import numpy
  import pytest
  from packaging.version import parse
  import dask.array
  from dask.array.utils import assert_eq, same_keys
label_desc: Use image node_id 7 for calling a global function with example usage: test_tril_triu() without return types