code: def triu(m, k=0):
      """Returns an upper triangle of an array.
  
      Args:
          m (array-like): Array or array-like object.
          k (int): The diagonal below which to zero elements. Zero is the main
              diagonal, a positive value is above it, and a negative value is
              below.
  
      Returns:
          cupy.ndarray: An upper triangle of an array.
  
      .. seealso:: :func:`numpy.triu`
  
      """
      m = cupy.asarray(m)
      mask = tri(*m.shape[-2:], k=k - 1, dtype=bool)
  
      return cupy.where(mask, m.dtype.type(0), m)
  
file_path: cupy/cupy/_creation/matrix.py
imports: import numpy
  import cupy
  from cupy import _core
label_desc: Use image node_id 5 for calling a global function with example usage: triu(m, k) and returns: cupy