code: def __init__(
      self,
      in_channels_decoder,
      in_channels_encoder,
      out_channels,
      norm_layer,
      activation,
      padding,
      attention_layer,
  ):
      super(UNetUpBlock, self).__init__()
      self.upconv = nn.Sequential(
          nn.Upsample(
              scale_factor=2, mode="bilinear", align_corners=True
          ),
          ConvBlock(
              in_channels_decoder,
              out_channels,
              kernel_size=3,
              stride=1,
              padding=1,
              norm_layer=None,
              activation=activation,
          ),
      )
      self.convs = UNetDoubleConv(
          in_channels_encoder + out_channels,
          out_channels,
          norm_layer=norm_layer,
          activation=activation,
          padding=padding,
      )
      if attention_layer is not None:
          self.attention = attention_layer(
              in_channels_encoder + out_channels, norm_layer, activation
          )
      else:
          self.attention = None
  
imports: import torch
  from torch import nn
  from functools import partial
  from .basic_blocks import ConvBlock
  from ..ops import FeaturesConnector
label_desc: Use image node_id 1 to create a new UNetUpBlock object from inherited base classes: nn with example: obj = UNetUpBlock(in_channels_decoder, in_channels_encoder, out_channels, norm_layer, activation, padding, attention_layer)