code: def diag(v, k=0):
      return ivy.diag(v, k=k)
  
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 3 for calling a global function with example usage: diag(v, k) and returns: ivy