class_docstr: Swin Transformer block 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
code: def forward(self, x, mask_matrix):
      shortcut = x
      if self.use_checkpoint:
          x = checkpoint.checkpoint(
              self.forward_part1, x, mask_matrix, use_reentrant=False
          )
      else:
          x = self.forward_part1(x, mask_matrix)
      x = shortcut + self.drop_path(x)
      if self.use_checkpoint:
          x = x + checkpoint.checkpoint(
              self.forward_part2, x, use_reentrant=False
          )
      else:
          x = x + self.forward_part2(x)
      return x
  
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 5 for calling the SwinTransformerBlock obj's underlying member method code with example usage: obj.forward(x, mask_matrix) and returns: x