code: def triu_indices(
      n_rows: int,
      n_cols: Optional[int] = None,
      k: int = 0,
      /,
      *,
      device: Optional[str] = None,
  ) -> Tuple[Union[tf.Tensor, tf.Variable]]:
      n_cols = n_rows if n_cols is None else n_cols
  
      if n_rows < 0 or n_cols < 0:
          n_rows, n_cols = 0, 0
  
      ret = [[], []]
  
      for i in range(0, min(n_rows, n_cols - k), 1):
          for j in range(max(0, k + i), n_cols, 1):
              ret[0].append(i)
              ret[1].append(j)
  
      return tuple(tf.convert_to_tensor(ret, dtype=tf.int64))
  
imports: import numpy
  from numbers import Number
  from typing import Union, List, Optional, Sequence, Tuple
  import tensorflow
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.ivy.creation import _asarray_to_native_arrays_and_back, _asarray_infer_device, _asarray_infer_dtype, _asarray_handle_nestable, NestedSequence, SupportsBufferProtocol, _asarray_inputs_to_native_shapes
  from .None import backend_version
label_desc: Use image node_id 22 for calling a global function with example usage: triu_indices() and returns: tuple