class_docstr: See :func:`shifted_window_attention_3d`.
code: def forward(self, x: Tensor) -> Tensor:
      _, t, h, w, _ = x.shape
      size_dhw = [t, h, w]
      window_size, shift_size = (
          self.window_size.copy(),
          self.shift_size.copy(),
      )
      # Handle case where window_size is larger than the input tensor
      window_size, shift_size = _get_window_and_shift_size(
          shift_size, size_dhw, window_size
      )
  
      relative_position_bias = self.get_relative_position_bias(
          window_size
      )
  
      return shifted_window_attention_3d(
          x,
          self.qkv.weight,
          self.proj.weight,
          relative_position_bias,
          window_size,
          self.num_heads,
          shift_size=shift_size,
          attention_dropout=self.attention_dropout,
          dropout=self.dropout,
          qkv_bias=self.qkv.bias,
          proj_bias=self.proj.bias,
          training=self.training,
      )
  
imports: from functools import partial
  from typing import Any, Callable, List, Optional, Tuple
  import torch
  import torch.nn.functional
  from torch import nn, Tensor
  from ...transforms._presets import VideoClassification
  from ...utils import _log_api_usage_once
  from .._api import register_model, Weights, WeightsEnum
  from .._meta import _KINETICS400_CATEGORIES
  from .._utils import _ovewrite_named_param, handle_legacy_interface
  from ..swin_transformer import PatchMerging, SwinTransformerBlock
label_desc: Use image node_id 5 for calling the ShiftedWindowAttention3d obj's underlying member method code with example usage: obj.forward(x) and returns: shifted_window_attention_3d