code: def __init__(
      self,
      main: nn.Module or None,
      shortcut: nn.Module or None,
      post_act=None,
      pre_norm: nn.Module or None = None,
  ):
      super().__init__()
  
      self.pre_norm = pre_norm
      self.main = main
      self.shortcut = shortcut
      self.post_act = build_act(post_act)
  
imports: from __future__ import annotations
  import torch
  import torch.nn.functional
  from torch import nn
  from torch.cuda.amp import autocast
  from kornia.contrib.models.efficient_vit.nn.act import build_act
  from kornia.contrib.models.efficient_vit.nn.norm import build_norm
  from kornia.contrib.models.efficient_vit.utils import get_same_padding, val2tuple
label_desc: Use image node_id 1 to create a new ResidualBlock object from inherited base classes: nn with example: obj = ResidualBlock(main, shortcut, post_act, pre_norm)