code: def fftshift(x, axes=None):
      x = ivy.asarray(x)
  
      if axes is None:
          axes = tuple(range(x.ndim))
          shift = [(dim // 2) for dim in x.shape]
      elif isinstance(
          axes,
          (
              int,
              type(ivy.uint8),
              type(ivy.uint16),
              type(ivy.uint32),
              type(ivy.uint64),
          ),
      ):
          shift = x.shape[axes] // 2
      else:
          shift = [(x.shape[ax] // 2) for ax in axes]
  
      roll = ivy.roll(x, shift, axis=axes)
  
      return roll
  
file_path: ivy/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py
imports: import ivy
  from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_unsupported_dtypes
label_desc: Use image node_id 4 for calling a global function with example usage: fftshift(x, axes) and returns: roll