class_docstr: Class that implements an adapted UNet. This class also serve as the parent class of LocalNet and GlobalNet
  
  Reference:
      O. Ronneberger, P. Fischer, and T. Brox,
      “U-net: Convolutional networks for biomedical image segmentation,”,
      Lecture Notes in Computer Science, 2015, vol. 9351, pp. 234–241.
      https://arxiv.org/abs/1505.04597
  
  Adapted from:
      DeepReg (https://github.com/DeepRegNet/DeepReg)
docstr: Args:
      x: Tensor in shape (batch, ``in_channels``, insize_1, insize_2, [insize_3])
  
  Returns:
      Tensor in shape (batch, ``out_channels``, insize_1, insize_2, [insize_3]), with the same spatial size as ``x``
docstr_tok: ["Args",":","x",":","Tensor","in","shape","(","batch",",","``","in_channels","``",",","insize_1",",","insize_2",",","[","insize_3","]",")","Returns",":","Tensor","in","shape","(","batch",",","``","out_channels","``",",","insize_1",",","insize_2",",","[","insize_3","]",")",",","with","the","same","spatial","size","as","``","x","``"]
code: def forward(self, x):
      """
      Args:
          x: Tensor in shape (batch, ``in_channels``, insize_1, insize_2, [insize_3])
  
      Returns:
          Tensor in shape (batch, ``out_channels``, insize_1, insize_2, [insize_3]), with the same spatial size as ``x``
      """
      image_size = x.shape[2:]
      skips = []  # [0, ..., depth - 1]
      encoded = x
      for encode_conv, encode_pool in zip(
          self.encode_convs, self.encode_pools
      ):
          skip = encode_conv(encoded)
          encoded = encode_pool(skip)
          skips.append(skip)
      decoded = self.bottom_block(encoded)
  
      outs = [decoded]
  
      for i, (decode_deconv, decode_conv) in enumerate(
          zip(self.decode_deconvs, self.decode_convs)
      ):
          decoded = decode_deconv(decoded)
          if self.concat_skip:
              decoded = torch.cat([decoded, skips[-i - 1]], dim=1)
          else:
              decoded = decoded + skips[-i - 1]
          decoded = decode_conv(decoded)
          outs.append(decoded)
  
      out = self.output_block(outs, image_size=image_size)
      return out
  
imports: from __future__ import annotations
  import torch
  from torch import nn
  from torch.nn import functional
  from monai.networks.blocks.regunet_block import RegistrationDownSampleBlock, RegistrationExtractionBlock, RegistrationResidualConvBlock, get_conv_block, get_deconv_block
  from monai.networks.utils import meshgrid_ij
label_desc: Use image node_id 10 for calling the RegUNet obj's underlying member method code with example usage: obj.forward(x) and returns: out