class_docstr: This class defines a padding operation:
  pad `2*border` pixels from spatial dims of the input (numpy array),
  and return the padded input.
  
  This function is used at volume level (as a preprocessor in image reader)
  therefore assumes the input has at least three spatial dims.
code: def layer_op(self, input_image, mask=None):
      if not isinstance(input_image, dict):
          self._set_full_border(input_image)
          input_image = np.pad(
              input_image, self.full_border, mode=self.mode
          )
          return input_image, mask
  
      for name, image in input_image.items():
          self._set_full_border(image)
          if name not in self.image_name:
              tf.logging.warning(
                  "could not pad, dict name %s not in %s",
                  name,
                  self.image_name,
              )
              continue
          input_image[name] = np.pad(
              image, self.full_border, mode=self.mode
          )
      return input_image, mask
  
file_path: NiftyNet/niftynet/layer/pad.py
imports: from __future__ import absolute_import, print_function
  import numpy
  import tensorflow
  from niftynet.layer.base_layer import Layer, Invertible
label_desc: Use image node_id 2 for calling the PadLayer obj's underlying member method code with example usage: obj.layer_op(input_image, mask) and returns: input_image,  mask, input_image,  mask