code: def ifftshift(x: Tensor, shift_dims: list[int]) -> Tensor:
      """
      Similar to np.fft.ifftshift but applies to PyTorch Tensors
  
      Args:
          x: input data (k-space or image) that can be
              1) real-valued: the shape is (C,H,W) for 2D spatial inputs and (C,H,W,D) for 3D, or
              2) complex-valued: the shape is (C,H,W,2) for 2D spatial data and (C,H,W,D,2) for 3D. C is the number of channels.
          shift_dims: dimensions over which the shift is applied
  
      Returns:
          ifft-shifted version of x
  
      Note:
          This function is called when ifftshift is not available in the running pytorch version
      """
      shift = [0] * len(shift_dims)
      for i, dim_num in enumerate(shift_dims):
          shift[i] = (x.shape[dim_num] + 1) // 2
      return roll(x, shift, shift_dims)
  
file_path: MONAI/monai/networks/blocks/fft_utils_t.py
imports: from __future__ import annotations
  import torch
  from torch import Tensor
label_desc: Use image node_id 4 for calling a global function with example usage: ifftshift(x, shift_dims) and returns: roll