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 load_from(self, weights, n_block, layer):
      root = f"module.{layer}.0.blocks.{n_block}."
      block_names = [
          "norm1.weight",
          "norm1.bias",
          "attn.relative_position_bias_table",
          "attn.relative_position_index",
          "attn.qkv.weight",
          "attn.qkv.bias",
          "attn.proj.weight",
          "attn.proj.bias",
          "norm2.weight",
          "norm2.bias",
          "mlp.fc1.weight",
          "mlp.fc1.bias",
          "mlp.fc2.weight",
          "mlp.fc2.bias",
      ]
      with torch.no_grad():
          self.norm1.weight.copy_(
              weights["state_dict"][root + block_names[0]]
          )
          self.norm1.bias.copy_(
              weights["state_dict"][root + block_names[1]]
          )
          self.attn.relative_position_bias_table.copy_(
              weights["state_dict"][root + block_names[2]]
          )
          self.attn.relative_position_index.copy_(
              weights["state_dict"][root + block_names[3]]
          )
          self.attn.qkv.weight.copy_(
              weights["state_dict"][root + block_names[4]]
          )
          self.attn.qkv.bias.copy_(
              weights["state_dict"][root + block_names[5]]
          )
          self.attn.proj.weight.copy_(
              weights["state_dict"][root + block_names[6]]
          )
          self.attn.proj.bias.copy_(
              weights["state_dict"][root + block_names[7]]
          )
          self.norm2.weight.copy_(
              weights["state_dict"][root + block_names[8]]
          )
          self.norm2.bias.copy_(
              weights["state_dict"][root + block_names[9]]
          )
          self.mlp.linear1.weight.copy_(
              weights["state_dict"][root + block_names[10]]
          )
          self.mlp.linear1.bias.copy_(
              weights["state_dict"][root + block_names[11]]
          )
          self.mlp.linear2.weight.copy_(
              weights["state_dict"][root + block_names[12]]
          )
          self.mlp.linear2.bias.copy_(
              weights["state_dict"][root + block_names[13]]
          )
  
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 4 for calling the SwinTransformerBlock obj's underlying member method code with example usage: obj.load_from(weights, n_block, layer) without return types