code: def triu_indices_from(arr, k=0):
      """
      Return the indices for the upper-triangle of arr.
  
      See `triu_indices` for full details.
  
      Parameters
      ----------
      arr : ndarray, shape(N, N)
          The indices will be valid for square arrays.
      k : int, optional
          Diagonal offset (see `triu` for details).
  
      Returns
      -------
      triu_indices_from : tuple, shape(2) of ndarray, shape(N)
          Indices for the upper-triangle of `arr`.
  
      See Also
      --------
      triu_indices, triu
  
      Notes
      -----
      .. versionadded:: 1.4.0
  
      """
      if arr.ndim != 2:
          raise ValueError("input array must be 2-d")
      return triu_indices(arr.shape[-2], k=k, m=arr.shape[-1])
  
imports: from __future__ import division, absolute_import, print_function
  import functools
  from numpy.core.numeric import absolute, asanyarray, arange, zeros, greater_equal, multiply, ones, asarray, where, int8, int16, int32, int64, empty, promote_types, diagonal, nonzero
  from numpy.core.overrides import set_module
  from numpy.core import overrides
  from numpy.core import iinfo, transpose
label_desc: Use image node_id 22 for calling a global function with example usage: triu_indices_from(arr, k) and returns: triu_indices