code: def ifftshift(x, axes=None):
      """The inverse of `fftshift`. Although identical for even-length `x`, the
      functions differ by one sample for odd-length `x`.
  
      Parameters
      ----------
      x : array_like
          Input array.
      axes : int or shape tuple, optional
          Axes over which to calculate.  Defaults to None, which shifts all axes.
  
      Returns
      -------
      y : ndarray
          The shifted array.
  
      See Also
      --------
      fftshift : Shift zero-frequency component to the center of the spectrum.
  
      Examples
      --------
      >>> freqs = np.fft.fftfreq(9, d=1./9).reshape(3, 3)
      >>> freqs
      array([[ 0.,  1.,  2.],
             [ 3.,  4., -4.],
             [-3., -2., -1.]])
      >>> np.fft.ifftshift(np.fft.fftshift(freqs))
      array([[ 0.,  1.,  2.],
             [ 3.,  4., -4.],
             [-3., -2., -1.]])
  
      """
      xp = array_namespace(x)
      if hasattr(xp, "fft"):
          return xp.fft.ifftshift(x, axes=axes)
      x = np.asarray(x)
      y = np.fft.ifftshift(x, axes=axes)
      return xp.asarray(y)
  
file_path: scipy/scipy/fft/_helper.py
imports: from functools import update_wrapper, lru_cache
  import inspect
  from ._pocketfft import helper
  import numpy
  from scipy._lib._array_api import array_namespace
label_desc: Use image node_id 6 for calling a global function with example usage: ifftshift(x, axes) and returns: xp, xp