code: def test_jax_diagonal(
      *,
      dtype_and_values,
      dims_and_offset,
      test_flags,
      on_device,
      fn_tree,
      frontend,
      backend_fw,
  ):
      input_dtype, value = dtype_and_values
      axis1, axis2, offset = dims_and_offset
      a = value[0]
      num_of_dims = len(np.shape(a))
      assume(axis1 != axis2)
      if axis1 < 0:
          assume(axis1 + num_of_dims != axis2)
      if axis2 < 0:
          assume(axis1 != axis2 + num_of_dims)
      helpers.test_frontend_function(
          input_dtypes=input_dtype,
          backend_to_test=backend_fw,
          test_flags=test_flags,
          frontend=frontend,
          fn_tree=fn_tree,
          on_device=on_device,
          a=a,
          offset=offset,
          axis1=axis1,
          axis2=axis2,
      )
  
imports: from hypothesis import strategies, assume
  import numpy
  import ivy
  from jax.numpy import tril, triu, r_, c_
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_frontend_test, BackendHandler
  from ...test_numpy.test_indexing_routines.test_inserting_data_into_arrays import _helper_r_, _helper_c_
  import ivy.functional.frontends.jax.numpy
label_desc: Use image node_id 9 for calling a global function with example usage: test_jax_diagonal() without return types