class_docstr: generate randomised scaling along each dim for data augmentation
code: def layer_op(self, inputs, interp_orders, *args, **kwargs):
      if inputs is None:
          return inputs
  
      if isinstance(inputs, dict) and isinstance(interp_orders, dict):
          for field, image in inputs.items():
              transformed_data = []
              interp_order = interp_orders[field][0]
              for mod_i in range(image.shape[-1]):
                  scaled_data = self._apply_transformation(
                      image[..., mod_i], interp_order
                  )
                  transformed_data.append(scaled_data[..., np.newaxis])
              inputs[field] = np.concatenate(transformed_data, axis=-1)
          # shapes = []
          # for (field, image) in inputs.items():
          #     shapes.append(image.shape)
          # assert(len(shapes) == 2 and shapes[0][0:4] == shapes[1][0:4]), shapes
      else:
          raise NotImplementedError("unknown input format")
      return inputs
  
file_path: NiftyNet/niftynet/layer/rand_spatial_scaling.py
imports: from __future__ import absolute_import, print_function
  import warnings
  import numpy
  import scipy.ndimage
  from niftynet.layer.base_layer import RandomisedLayer
label_desc: Use image node_id 5 for calling the RandomSpatialScalingLayer obj's underlying member method code with example usage: obj.layer_op(inputs, interp_orders) and returns: inputs, inputs