code: def __init__(
      self,
      in_chs,
      mid_chs,
      out_chs,
      layer_per_block,
      residual=False,
      depthwise=False,
      attn="",
      norm_layer=BatchNormAct2d,
      act_layer=nn.ReLU,
      drop_path=None,
  ):
      super(OsaBlock, self).__init__()
  
      self.residual = residual
      self.depthwise = depthwise
      conv_kwargs = dict(norm_layer=norm_layer, act_layer=act_layer)
  
      next_in_chs = in_chs
      if self.depthwise and next_in_chs != mid_chs:
          assert not residual
          self.conv_reduction = ConvNormAct(
              next_in_chs, mid_chs, 1, **conv_kwargs
          )
      else:
          self.conv_reduction = None
  
      mid_convs = []
      for i in range(layer_per_block):
          if self.depthwise:
              conv = SeparableConvNormAct(
                  mid_chs, mid_chs, **conv_kwargs
              )
          else:
              conv = ConvNormAct(next_in_chs, mid_chs, 3, **conv_kwargs)
          next_in_chs = mid_chs
          mid_convs.append(conv)
      self.conv_mid = SequentialAppendList(*mid_convs)
  
      # feature aggregation
      next_in_chs = in_chs + layer_per_block * mid_chs
      self.conv_concat = ConvNormAct(
          next_in_chs, out_chs, **conv_kwargs
      )
  
      self.attn = create_attn(attn, out_chs) if attn else None
  
      self.drop_path = drop_path
  
imports: from typing import List
  import torch
  import torch.nn
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import ConvNormAct, SeparableConvNormAct, BatchNormAct2d, ClassifierHead, DropPath, create_attn, create_norm_act_layer
  from ._builder import build_model_with_cfg
  from ._manipulate import checkpoint_seq
  from ._registry import register_model, generate_default_cfgs
label_desc: Use image node_id 1 to create a new OsaBlock object from inherited base classes: nn with example: obj = OsaBlock(in_chs, mid_chs, out_chs, layer_per_block, residual, depthwise, attn, norm_layer, act_layer, drop_path)