code: def __init__(
      self,
      in_channels,
      mid_channels,
      out_channels,
      layer_num,
      identity=False,
  ):
      super().__init__()
      self.identity = identity
  
      self.layers = nn.LayerList()
      self.layers.append(
          ConvBNAct(
              in_channels=in_channels,
              out_channels=mid_channels,
              kernel_size=3,
              stride=1,
          )
      )
      for _ in range(layer_num - 1):
          self.layers.append(
              ConvBNAct(
                  in_channels=mid_channels,
                  out_channels=mid_channels,
                  kernel_size=3,
                  stride=1,
              )
          )
  
      # feature aggregation
      total_channels = in_channels + layer_num * mid_channels
      self.aggregation_conv = ConvBNAct(
          in_channels=total_channels,
          out_channels=out_channels,
          kernel_size=1,
          stride=1,
      )
      self.att = ESEModule(out_channels)
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.initializer import KaimingNormal, Constant
  from paddle.nn import Conv2D, BatchNorm2D, ReLU, AdaptiveAvgPool2D, MaxPool2D
  from paddle.regularizer import L2Decay
  from paddle import ParamAttr
label_desc: Use image node_id 1 to create a new HG_Block object from inherited base classes: nn with example: obj = HG_Block(in_channels, mid_channels, out_channels, layer_num, identity)