code: def transpose(a, axes=None):
      if ivy.isscalar(a):
          return ivy.array(a)
      elif a.ndim == 1:
          return a
      if not axes:
          axes = list(range(len(a.shape)))[::-1]
      if isinstance(axes, int):
          axes = [axes]
      if (len(a.shape) == 0 and not axes) or (
          len(a.shape) == 1 and axes[0] == 0
      ):
          return a
      return ivy.permute_dims(a, axes, out=None)
  
imports: import ivy
  from ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back, handle_jax_dtype
  from ivy.functional.frontends.jax.numpy import promote_types_of_jax_inputs
label_desc: Use image node_id 41 for calling a global function with example usage: transpose(a, axes) and returns: ivy, ivy, a, a