class_docstr: Defines a layer in the UNet topology which combines the downsample and upsample pathways with the skip connection.
  The member `next_layer` may refer to instances of this class or the final bottleneck layer at the bottom the UNet
  structure. The purpose of using a recursive class like this is to get around the Torchscript restrictions on
  looping over lists of layers and accumulating lists of output tensors which must be indexed. The `heads` list is
  shared amongst all the instances of this class and is used to store the output from the supervision heads during
  forward passes of the network.
class_docstr_tok: ["Defines","a","layer","in","the","UNet","topology","which","combines","the","downsample","and","upsample","pathways","with","the","skip","connection",".","The","member","`","next_layer","`","may","refer","to","instances","of","this","class","or","the","final","bottleneck","layer","at","the","bottom","the","UNet","structure",".","The","purpose","of","using","a","recursive","class","like","this","is","to","get","around","the","Torchscript","restrictions","on","looping","over","lists","of","layers","and","accumulating","lists","of","output","tensors","which","must","be","indexed",".","The","`","heads","`","list","is","shared","amongst","all","the","instances","of","this","class","and","is","used","to","store","the","output","from","the","supervision","heads","during","forward","passes","of","the","network","."]
code: def __init__(
      self,
      index,
      downsample,
      upsample,
      next_layer,
      heads=None,
      super_head=None,
  ):
      super().__init__()
      self.downsample = downsample
      self.next_layer = next_layer
      self.upsample = upsample
      self.super_head = super_head
      self.heads = heads
      self.index = index
  
imports: from typing import List, Optional, Sequence, Tuple, Union
  import torch
  import torch.nn
  from torch.nn.functional import interpolate
  from monai.networks.blocks.dynunet_block import UnetBasicBlock, UnetOutBlock, UnetResBlock, UnetUpBlock
label_desc: Use image node_id 1 to create a new DynUNetSkipLayer object from inherited base classes: nn with example: obj = DynUNetSkipLayer(index, downsample, upsample, next_layer, heads, super_head)