code: def get_window_size(x_size, window_size, shift_size=None):
      """Computing window size based on: "Liu et al.,
      Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
      <https://arxiv.org/abs/2103.14030>"
      https://github.com/microsoft/Swin-Transformer
  
       Args:
          x_size: input size.
          window_size: local window size.
          shift_size: window shifting size.
      """
  
      use_window_size = list(window_size)
      if shift_size is not None:
          use_shift_size = list(shift_size)
      for i in range(len(x_size)):
          if x_size[i] <= window_size[i]:
              use_window_size[i] = x_size[i]
              if shift_size is not None:
                  use_shift_size[i] = 0
  
      if shift_size is None:
          return tuple(use_window_size)
      else:
          return tuple(use_window_size), tuple(use_shift_size)
  
imports: from __future__ import annotations
  import itertools
  from collections.abc import Sequence
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils.checkpoint
  from torch.nn import LayerNorm
  from typing_extensions import Final
  from monai.networks.blocks import MLPBlock
  from monai.networks.blocks import PatchEmbed, UnetOutBlock, UnetrBasicBlock, UnetrUpBlock
  from monai.networks.layers import DropPath, trunc_normal_
  from monai.utils import ensure_tuple_rep, look_up_option, optional_import
  from monai.utils.deprecate_utils import deprecated_arg
label_desc: Use image node_id 3 for calling a global function with example usage: get_window_size(x_size, window_size, shift_size) and returns: tuple, tuple,  tuple