class_docstr: generate randomised elastic deformations
  along each dim for data augmentation
code: def layer_op(self, inputs, interp_orders, *args, **kwargs):
      if inputs is None:
          return inputs
  
      # only do augmentation with a probability `proportion_to_augment`
      do_augmentation = np.random.rand() < self.proportion_to_augment
      if not do_augmentation:
          return inputs
  
      if isinstance(inputs, dict) and isinstance(interp_orders, dict):
          for field, image in inputs.items():
              assert image.shape[-1] == len(interp_orders[field]), (
                  "interpolation orders should be"
                  "specified for each inputs modality"
              )
              for mod_i, interp_order in enumerate(
                  interp_orders[field]
              ):
                  if image.ndim in (3, 4):  # for 2/3d images
                      inputs[field][
                          ..., mod_i
                      ] = self._apply_bspline_transformation(
                          image[..., mod_i], interp_order
                      )
                  elif image.ndim == 5:
                      for t in range(image.shape[-2]):
                          inputs[field][
                              ..., t, mod_i
                          ] = self._apply_bspline_transformation(
                              image[..., t, mod_i], interp_order
                          )
                  else:
                      raise NotImplementedError("unknown input format")
  
      else:
          raise NotImplementedError("unknown input format")
      return inputs
  
file_path: NiftyNet/niftynet/layer/rand_elastic_deform.py
imports: from __future__ import absolute_import, print_function
  import warnings
  import numpy
  from niftynet.layer.base_layer import RandomisedLayer
  from niftynet.utilities.util_import import require_module
label_desc: Use image node_id 5 for calling the RandomElasticDeformationLayer obj's underlying member method code with example usage: obj.layer_op(inputs, interp_orders) and returns: inputs, inputs, inputs