code: def initialise_sampler(self):
      if self.is_training:
          self.sampler = []
          assert (
              len(self.readers) >= 2
          ), "at least two readers are required"
          training_sampler = PairwiseUniformSampler(
              reader_0=self.readers[0],
              reader_1=self.readers[1],
              data_param=self.data_param,
              batch_size=self.net_param.batch_size,
          )
          self.sampler.append(training_sampler)
          # adding validation readers if possible
          if len(self.readers) >= 4:
              validation_sampler = PairwiseUniformSampler(
                  reader_0=self.readers[2],
                  reader_1=self.readers[3],
                  data_param=self.data_param,
                  batch_size=self.net_param.batch_size,
              )
              self.sampler.append(validation_sampler)
      else:
          self.sampler = PairwiseResizeSampler(
              reader_0=self.readers[0],
              reader_1=self.readers[1],
              data_param=self.data_param,
              batch_size=self.net_param.batch_size,
          )
  
imports: from __future__ import absolute_import, division, print_function
  import tensorflow
  from niftynet.application.base_application import BaseApplication
  from niftynet.io.image_reader import ImageReader
  from niftynet.contrib.sampler_pairwise.sampler_pairwise_uniform import PairwiseUniformSampler
  from niftynet.contrib.sampler_pairwise.sampler_pairwise_resize import PairwiseResizeSampler
  from niftynet.engine.application_factory import OptimiserFactory, ApplicationNetFactory
  from niftynet.engine.application_variables import NETWORK_OUTPUT, CONSOLE, TF_SUMMARIES
  from niftynet.engine.windows_aggregator_resize import ResizeSamplesAggregator
  from niftynet.layer.resampler import ResamplerLayer
  from niftynet.layer.pad import PadLayer
  from niftynet.layer.loss_segmentation import LossFunction
label_desc: Use image node_id 3 for calling the RegApp obj's underlying member method code with example usage: obj.initialise_sampler() without return types