code: def diag_indices(n, ndim=2):
      idx = ivy.arange(n, dtype=int)
      return (idx,) * ndim
  
imports: import inspect
  import abc
  import ivy
  from ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back
  from .creation import linspace, arange, array
  from .manipulations import transpose, concatenate, expand_dims
label_desc: Use image node_id 4 for calling a global function with example usage: diag_indices(n, ndim) and returns: unknown