code: def __init__(
      self,
      spatial_dims: int,
      in_channels: int,
      nconvs: int,
      act: tuple[str, dict] | str,
      dropout_prob: float | None = None,
      dropout_dim: int = 3,
      bias: bool = False,
  ):
      super().__init__()
  
      conv_type: type[nn.Conv2d | nn.Conv3d] = Conv[
          Conv.CONV, spatial_dims
      ]
      norm_type: type[nn.BatchNorm2d | nn.BatchNorm3d] = Norm[
          Norm.BATCH, spatial_dims
      ]
      dropout_type: type[
          nn.Dropout | nn.Dropout2d | nn.Dropout3d
      ] = Dropout[Dropout.DROPOUT, dropout_dim]
  
      out_channels = 2 * in_channels
      self.down_conv = conv_type(
          in_channels, out_channels, kernel_size=2, stride=2, bias=bias
      )
      self.bn1 = norm_type(out_channels)
      self.act_function1 = get_acti_layer(act, out_channels)
      self.act_function2 = get_acti_layer(act, out_channels)
      self.ops = _make_nconv(
          spatial_dims, out_channels, nconvs, act, bias
      )
      self.dropout = (
          dropout_type(dropout_prob)
          if dropout_prob is not None
          else None
      )
  
imports: from __future__ import annotations
  import torch
  import torch.nn
  from monai.networks.blocks.convolutions import Convolution
  from monai.networks.layers.factories import Act, Conv, Dropout, Norm, split_args
  from monai.utils import deprecated_arg
label_desc: Use image node_id 1 to create a new DownTransition object from inherited base classes: nn with example: obj = DownTransition(spatial_dims, in_channels, nconvs, act, dropout_prob, dropout_dim, bias)