code: def _reduction_dims(a, axis):
      ndims = len(ivy.shape(a))
      if axis is None:
          return (tuple(range(ndims)),) * 2
      if not isinstance(axis, (tuple, list)):
          axis = (axis,)
      canon_axis = tuple(_canonicalize_axis(ax, ndims) for ax in axis)
      ivy.utils.assertions.check_equal(
          len(canon_axis),
          len(set(canon_axis)),
          message=f"duplicate value in 'axis': {axis}",
          as_array=False,
      )
  
      # TODO: deal with named axis
  
      canon_pos_axis = tuple(
          x for x in canon_axis if isinstance(x, int)
      )
  
      if len(canon_pos_axis) != len(canon_axis):
          return canon_pos_axis, canon_axis
      else:
          return canon_axis, canon_axis
  
imports: import ivy
  from ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_supported_dtypes
label_desc: Use image node_id 5 for calling a global function with example usage: _reduction_dims(a, axis) and returns: unknown, canon_pos_axis,  canon_axis, canon_axis,  canon_axis