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 forward(self, x):
      downout = self.downsample(x)
      nextout = self.next_layer(downout)
      upout = self.upsample(nextout, downout)
      if (
          self.super_head is not None
          and self.heads is not None
          and self.index > 0
      ):
          self.heads[self.index - 1] = self.super_head(upout)
  
      return upout
  
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 2 for calling the DynUNetSkipLayer obj's underlying member method code with example usage: obj.forward(x) and returns: upout