code: def _get_image(self, image_source_type, image_id):
      # returns a random image from either the list of fixed images
      # or the list of moving images
      try:
          image_source_type = image_source_type.decode()
      except AttributeError:
          pass
      if image_source_type.startswith("fixed"):
          _, data, _ = self.reader_0(idx=image_id)
      else:  # image_source_type.startswith('moving'):
          _, data, _ = self.reader_1(idx=image_id)
      image = np.asarray(data[image_source_type]).astype(np.float32)
      image_shape = list(image.shape)
      image = np.reshape(image, image_shape[: self.spatial_rank] + [-1])
      image_shape = np.asarray(image.shape).astype(np.int32)
      return image, image_shape
  
file_path: NiftyNet/niftynet/contrib/sampler_pairwise/sampler_pairwise_uniform_csv.py
imports: from __future__ import absolute_import, division, print_function
  import numpy
  import tensorflow
  from niftynet.engine.image_window import ImageWindow
  from niftynet.layer.base_layer import Layer
  from niftynet.layer.grid_warper import AffineGridWarperLayer
  from niftynet.layer.resampler import ResamplerLayer
  from niftynet.layer.linear_resize import LinearResizeLayer
label_desc: Use image node_id 3 for calling the PairwiseUniformSampler obj's underlying member method code with example usage: obj._get_image(image_source_type, image_id) and returns: image,  image_shape