code: def ms_image_deaugment(
      images: List[Tensor],
      size_offsets: List[Union[int, Tuple[int, int]]],
      reduction: MaybeStrOrCallable = "mean",
      mode: str = "bilinear",
      align_corners: bool = True,
      stride: int = 1,
  ) -> Tensor:
      """
      Perform multi-scale deaugmentation of predicted feature maps.
  
      Args:
          images: List of tensors of shape [B, C, Hi, Wi], [B, C, Hj, Wj], [B, C, Hk, Wk]
          size_offsets:
          reduction:
          mode:
          align_corners:
          stride: Stride of the output feature map w.r.t to model input size.
          Used to correctly scale size_offsets to match with size of output feature maps
  
      Returns:
          Averaged feature-map of the original size
      """
      if len(images) != len(size_offsets):
          raise ValueError(
              "Number of images must be equal to number of size offsets"
          )
  
      deaugmented_outputs = []
      for feature_map, offset in zip(images, size_offsets):
          if isinstance(offset, (tuple, list)):
              rows_offset, cols_offset = offset
          else:
              rows_offset, cols_offset = offset, offset
  
          if rows_offset == 0 and cols_offset == 0:
              deaugmented_outputs.append(feature_map)
          else:
              _, _, rows, cols = feature_map.size()
              original_size = (
                  rows - rows_offset // stride,
                  cols - cols_offset // stride,
              )
              scaled_image = torch.nn.functional.interpolate(
                  feature_map,
                  size=original_size,
                  mode=mode,
                  align_corners=align_corners,
              )
              deaugmented_outputs.append(scaled_image)
  
      deaugmented_outputs = torch.stack(deaugmented_outputs)
      return _deaugment_averaging(
          deaugmented_outputs, reduction=reduction
      )
  
imports: from collections import defaultdict
  from functools import partial
  from typing import Tuple, List, Optional, Union, Callable, Dict, Mapping
  import torch
  from torch import Tensor, nn
  from .None import functional
  from ..utils.support import pytorch_toolbelt_deprecated
label_desc: Use image node_id 33 for calling a global function with example usage: ms_image_deaugment(images, size_offsets, reduction, mode, align_corners, stride) and returns: _deaugment_averaging