code: def initialise_sampler(self):
      self.sampler = []
      if self.is_training:
          self.sampler.append(
              [
                  ResizeSampler(
                      reader=reader,
                      window_sizes=self.data_param,
                      batch_size=self.net_param.batch_size,
                      windows_per_image=1,
                      shuffle=True,
                      queue_length=self.net_param.queue_length,
                  )
                  for reader in self.readers
              ]
          )
      else:
          self.sampler.append(
              [
                  RandomVectorSampler(
                      names=("vector",),
                      vector_size=(self.gan_param.noise_size,),
                      batch_size=self.net_param.batch_size,
                      n_interpolations=self.gan_param.n_interpolations,
                      repeat=None,
                      queue_length=self.net_param.queue_length,
                  )
                  for _ in self.readers
              ]
          )
          # repeat each resized image n times, so that each
          # image matches one random vector,
          # (n = self.gan_param.n_interpolations)
          self.sampler.append(
              [
                  ResizeSampler(
                      reader=reader,
                      window_sizes=self.data_param,
                      batch_size=self.net_param.batch_size,
                      windows_per_image=self.gan_param.n_interpolations,
                      shuffle=False,
                      queue_length=self.net_param.queue_length,
                  )
                  for reader in self.readers
              ]
          )
  
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.application.base_application import BaseApplication
  from niftynet.engine.application_factory import ApplicationNetFactory
  from niftynet.engine.application_factory import OptimiserFactory
  from niftynet.engine.application_variables import CONSOLE, NETWORK_OUTPUT, TF_SUMMARIES
  from niftynet.engine.sampler_random_vector_v2 import RandomVectorSampler
  from niftynet.engine.sampler_resize_v2 import ResizeSampler
  from niftynet.contrib.csv_reader.sampler_resize_v2_csv import ResizeSamplerCSV
  from niftynet.engine.windows_aggregator_identity import WindowAsImageAggregator
  from niftynet.io.image_reader import ImageReader
  from niftynet.layer.binary_masking import BinaryMaskingLayer
  from niftynet.layer.histogram_normalisation import HistogramNormalisationLayer
  from niftynet.layer.loss_gan import LossFunction
  from niftynet.layer.mean_variance_normalisation import MeanVarNormalisationLayer
  from niftynet.layer.rand_flip import RandomFlipLayer
  from niftynet.layer.rand_rotation import RandomRotationLayer
  from niftynet.layer.rand_spatial_scaling import RandomSpatialScalingLayer
label_desc: Use image node_id 3 for calling the GANApplication obj's underlying member method code with example usage: obj.initialise_sampler() without return types