class_docstr: Add a random flipping layer as pre-processing.
code: def layer_op(self, inputs, interp_orders=None, *args, **kwargs):
      if inputs is None:
          return inputs
      if isinstance(inputs, dict) and isinstance(interp_orders, dict):
          for field, image_data in inputs.items():
              assert all([i < 0 for i in interp_orders[field]]) or all(
                  [i >= 0 for i in interp_orders[field]]
              ), "Cannot combine interpolatable and non-interpolatable data"
              if interp_orders[field][0] < 0:
                  continue
              inputs[field] = self._apply_transformation(image_data)
      else:
          inputs = self._apply_transformation(inputs)
      return inputs
  
file_path: NiftyNet/niftynet/layer/rand_flip.py
imports: from __future__ import absolute_import, print_function
  import warnings
  import numpy
  from niftynet.layer.base_layer import RandomisedLayer
label_desc: Use image node_id 4 for calling the RandomFlipLayer obj's underlying member method code with example usage: obj.layer_op(inputs, interp_orders) and returns: inputs, inputs