code: def test_tri_like(xp, N, M, k, dtype, chunks):
      args = [N, M, k, dtype]
  
      cp_a = cupy.tri(*args)
  
      if xp is da:
          args.append(chunks)
      xp_a = xp.tri(*args, like=da.from_array(cupy.array(())))
  
      assert_eq(xp_a, cp_a)
  
file_path: dask/dask/array/tests/test_cupy_creation.py
imports: from __future__ import annotations
  import numpy
  import pytest
  import dask.array
  from dask import config
  from dask.array.numpy_compat import AxisError
  from dask.array.utils import assert_eq
label_desc: Use image node_id 4 for calling a global function with example usage: test_tri_like(xp, N, M, k, dtype, chunks) without return types