code: def sensitivity_map_reduce(
      kspace: Tensor, sens_maps: Tensor, spatial_dims: int = 2
  ) -> Tensor:
      """
      Reduces coil measurements to a corresponding image based on the given sens_maps. Let's say there
      are C coil measurements inside kspace, then this function multiplies the conjugate of each coil sensitivity map with the
      corresponding coil image. The result of this process will be C images. Summing those images together gives the
      resulting "reduced image."
  
      Args:
          kspace: 2D kspace (B,C,H,W,2) with the last dimension being 2 (for real/imaginary parts) and C denoting the
              coil dimension. 3D data will have the shape (B,C,H,W,D,2).
          sens_maps: sensitivity maps of the same shape as input x.
          spatial_dims: is 2 for 2D data and is 3 for 3D data
  
      Returns:
          reduction of x to (B,1,H,W,2) for 2D data or (B,1,H,W,D,2) for 3D data.
      """
      img = ifftn_centered_t(
          kspace, spatial_dims=spatial_dims, is_complex=True
      )  # inverse fourier transform
      return complex_mul_t(img, complex_conj_t(sens_maps)).sum(
          dim=1, keepdim=True
      )
  
file_path: MONAI/monai/apps/reconstruction/networks/nets/utils.py
imports: from __future__ import annotations
  import math
  from torch import Tensor
  from torch.nn import functional
  from monai.apps.reconstruction.complex_utils import complex_conj_t, complex_mul_t
  from monai.networks.blocks.fft_utils_t import fftn_centered_t, ifftn_centered_t
label_desc: Use image node_id 9 for calling a global function with example usage: sensitivity_map_reduce(kspace, sens_maps, spatial_dims) and returns: complex_mul_t