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