class_docstr: A skip-connection based module that can be used for DynUNet, based on:
  `Automated Design of Deep Learning Methods for Biomedical Image Segmentation <https://arxiv.org/abs/1904.08128>`_.
  `nnU-Net: Self-adapting Framework for U-Net-Based Medical Image Segmentation <https://arxiv.org/abs/1809.10486>`_.
  
  Args:
      spatial_dims: number of spatial dimensions.
      in_channels: number of input channels.
      out_channels: number of output channels.
      kernel_size: convolution kernel size.
      stride: convolution stride.
      norm_name: feature normalization type and arguments.
      act_name: activation layer type and arguments.
      dropout: dropout probability.
class_docstr_tok: ["A","skip-connection","based","module","that","can","be","used","for","DynUNet",",","based","on",":","`","Automated","Design","of","Deep","Learning","Methods","for","Biomedical","Image","Segmentation","<","https",":","\/\/arxiv.org\/abs\/1904.08128",">","`","_",".","`","nnU-Net",":","Self-adapting","Framework","for","U-Net-Based","Medical","Image","Segmentation","<","https",":","\/\/arxiv.org\/abs\/1809.10486",">","`","_",".","Args",":","spatial_dims",":","number","of","spatial","dimensions",".","in_channels",":","number","of","input","channels",".","out_channels",":","number","of","output","channels",".","kernel_size",":","convolution","kernel","size",".","stride",":","convolution","stride",".","norm_name",":","feature","normalization","type","and","arguments",".","act_name",":","activation","layer","type","and","arguments",".","dropout",":","dropout","probability","."]
code: def __init__(
      self,
      spatial_dims: int,
      in_channels: int,
      out_channels: int,
      kernel_size: Sequence[int] | int,
      stride: Sequence[int] | int,
      norm_name: tuple | str,
      act_name: tuple
      | str = ("leakyrelu", {"inplace": True, "negative_slope": 0.01}),
      dropout: tuple | str | float | None = None,
  ):
      super().__init__()
      self.conv1 = get_conv_layer(
          spatial_dims,
          in_channels,
          out_channels,
          kernel_size=kernel_size,
          stride=stride,
          dropout=dropout,
          act=None,
          norm=None,
          conv_only=False,
      )
      self.conv2 = get_conv_layer(
          spatial_dims,
          out_channels,
          out_channels,
          kernel_size=kernel_size,
          stride=1,
          dropout=dropout,
          act=None,
          norm=None,
          conv_only=False,
      )
      self.lrelu = get_act_layer(name=act_name)
      self.norm1 = get_norm_layer(
          name=norm_name,
          spatial_dims=spatial_dims,
          channels=out_channels,
      )
      self.norm2 = get_norm_layer(
          name=norm_name,
          spatial_dims=spatial_dims,
          channels=out_channels,
      )
      self.downsample = in_channels != out_channels
      stride_np = np.atleast_1d(stride)
      if not np.all(stride_np == 1):
          self.downsample = True
      if self.downsample:
          self.conv3 = get_conv_layer(
              spatial_dims,
              in_channels,
              out_channels,
              kernel_size=1,
              stride=stride,
              dropout=dropout,
              act=None,
              norm=None,
              conv_only=False,
          )
          self.norm3 = get_norm_layer(
              name=norm_name,
              spatial_dims=spatial_dims,
              channels=out_channels,
          )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  import numpy
  import torch
  import torch.nn
  from monai.networks.blocks.convolutions import Convolution
  from monai.networks.layers.factories import Act, Norm
  from monai.networks.layers.utils import get_act_layer, get_norm_layer
label_desc: Use image node_id 1 to create a new UnetResBlock object from inherited base classes: nn with example: obj = UnetResBlock(spatial_dims, in_channels, out_channels, kernel_size, stride, norm_name, act_name, dropout)