code: def __call__(self, shape, dtype, partition_info=None):
      shape = list(shape)
      if self.upsample_factor == 1:
          return self.initializer(shape)
  
      # Initializing W0 (enough kernels for one output channel)
      new_shape = shape[:-1] + [
          shape[-1] // (self.upsample_factor ** (len(shape) - 2))
      ]
      x = self.initializer(new_shape, dtype, partition_info)
  
      # Repeat the elements along the output dimension
      x = tf.keras.backend.repeat_elements(
          x=x, rep=self.upsample_factor ** (len(shape) - 2), axis=-1
      )
  
      return x
  
file_path: NiftyNet/niftynet/layer/subpixel.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer.base_layer import TrainableLayer
  from niftynet.layer.convolution import ConvolutionalLayer
  from niftynet.layer.downsample import DownSampleLayer
label_desc: Use image node_id 2 for calling the _ICNR obj's underlying member method code with example usage: obj.__call__(shape, dtype, partition_info) and returns: x, self