code: def __init__(
      self,
      spatial_dims: int,
      in_channels: int,
      out_channels: int,
      nconvs: int,
      act: tuple[str, dict] | str,
      dropout_prob: tuple[float | None, float] = (None, 0.5),
      dropout_dim: int = 3,
  ):
      super().__init__()
  
      conv_trans_type: type[
          nn.ConvTranspose2d | nn.ConvTranspose3d
      ] = Conv[Conv.CONVTRANS, 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]
  
      self.up_conv = conv_trans_type(
          in_channels, out_channels // 2, kernel_size=2, stride=2
      )
      self.bn1 = norm_type(out_channels // 2)
      self.dropout = (
          dropout_type(dropout_prob[0])
          if dropout_prob[0] is not None
          else None
      )
      self.dropout2 = dropout_type(dropout_prob[1])
      self.act_function1 = get_acti_layer(act, out_channels // 2)
      self.act_function2 = get_acti_layer(act, out_channels)
      self.ops = _make_nconv(spatial_dims, out_channels, nconvs, act)
  
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 UpTransition object from inherited base classes: nn with example: obj = UpTransition(spatial_dims, in_channels, out_channels, nconvs, act, dropout_prob, dropout_dim)