code: def diagonal(x, offset=0, axis1=0, axis2=1, name=None):
      return ivy.diagonal(x, offset=offset, axis1=axis1, axis2=axis2)
  
imports: import ivy
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from ivy.functional.frontends.paddle import promote_types_of_paddle_inputs
  from ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 7 for calling a global function with example usage: diagonal(x, offset, axis1, axis2, name) and returns: ivy