code: def tril(x: Array, /, *, k: int = 0) -> Array:
      """
      Array API compatible wrapper for :py:func:`np.tril <numpy.tril>`.
  
      See its docstring for more information.
      """
      from ._array_object import Array
  
      if x.ndim < 2:
          # Note: Unlike np.tril, x must be at least 2-D
          raise ValueError("x must be at least 2-dimensional for tril")
      return Array._new(np.tril(x._array, k=k))
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, List, Optional, Tuple, Union
  from ._dtypes import _all_dtypes
  import cupy
  from cupy.cuda import Device
  from cupy_backends.cuda.api import runtime
label_desc: Use image node_id 14 for calling a global function with example usage: tril() and returns: Array