code: def initialise_dataset_loader(
      self, data_param=None, task_param=None, data_partitioner=None
  ):
      self.data_param = data_param
      self.regression_param = task_param
  
      # initialise input image readers
      if self.is_training:
          reader_names = ("image", "output", "weight", "sampler")
          csv_reader_names = ()
      elif self.is_inference:
          # in the inference process use `image` input only
          reader_names = ("image",)
          csv_reader_names = ()
      elif self.is_evaluation:
          reader_names = ("image", "output", "inferred")
          csv_reader_names = ()
      else:
          tf.logging.fatal(
              "Action `%s` not supported. Expected one of %s",
              self.action,
              self.SUPPORTED_PHASES,
          )
          raise ValueError
      try:
          reader_phase = self.action_param.dataset_to_infer
      except AttributeError:
          reader_phase = None
      file_lists = data_partitioner.get_file_lists_by(
          phase=reader_phase, action=self.action
      )
      self.readers = [
          ImageReader(reader_names).initialise(
              data_param, task_param, file_list
          )
          for file_list in file_lists
      ]
      self.csv_readers = [
          CSVReader(csv_reader_names).initialise(
              data_param, task_param, file_list
          )
          for file_list in file_lists
      ]
  
      # initialise input preprocessing layers
      mean_var_normaliser = (
          MeanVarNormalisationLayer(image_name="image")
          if self.net_param.whitening
          else None
      )
      histogram_normaliser = (
          HistogramNormalisationLayer(
              image_name="image",
              modalities=vars(task_param).get("image"),
              model_filename=self.net_param.histogram_ref_file,
              norm_type=self.net_param.norm_type,
              cutoff=self.net_param.cutoff,
              name="hist_norm_layer",
          )
          if (
              self.net_param.histogram_ref_file
              and self.net_param.normalisation
          )
          else None
      )
      rgb_normaliser = (
          RGBHistogramEquilisationLayer(
              image_name="image", name="rbg_norm_layer"
          )
          if self.net_param.rgb_normalisation
          else None
      )
  
      normalisation_layers = []
      if histogram_normaliser is not None:
          normalisation_layers.append(histogram_normaliser)
      if mean_var_normaliser is not None:
          normalisation_layers.append(mean_var_normaliser)
      if rgb_normaliser is not None:
          normalisation_layers.append(rgb_normaliser)
  
      volume_padding_layer = [
          PadLayer(
              image_name=SUPPORTED_INPUT,
              border=self.net_param.volume_padding_size,
              mode=self.net_param.volume_padding_mode,
              pad_to=self.net_param.volume_padding_to_size,
          )
      ]
  
      # initialise training data augmentation layers
      augmentation_layers = []
      if self.is_training:
          train_param = self.action_param
          if train_param.random_flipping_axes != -1:
              augmentation_layers.append(
                  RandomFlipLayer(
                      flip_axes=train_param.random_flipping_axes
                  )
              )
          if train_param.scaling_percentage:
              augmentation_layers.append(
                  RandomSpatialScalingLayer(
                      min_percentage=train_param.scaling_percentage[0],
                      max_percentage=train_param.scaling_percentage[1],
                      antialiasing=train_param.antialiasing,
                      isotropic=train_param.isotropic_scaling,
                  )
              )
          if train_param.rotation_angle:
              rotation_layer = RandomRotationLayer()
              if train_param.rotation_angle:
                  rotation_layer.init_uniform_angle(
                      train_param.rotation_angle
                  )
              augmentation_layers.append(rotation_layer)
          if train_param.do_elastic_deformation:
              spatial_rank = list(
                  self.readers[0].spatial_ranks.values()
              )[0]
              augmentation_layers.append(
                  RandomElasticDeformationLayer(
                      spatial_rank=spatial_rank,
                      num_controlpoints=train_param.num_ctrl_points,
                      std_deformation_sigma=train_param.deformation_sigma,
                      proportion_to_augment=train_param.proportion_to_deform,
                  )
              )
  
      # only add augmentation to first reader (not validation reader)
      self.readers[0].add_preprocessing_layers(
          volume_padding_layer
          + normalisation_layers
          + augmentation_layers
      )
  
      for reader in self.readers[1:]:
          reader.add_preprocessing_layers(
              volume_padding_layer + normalisation_layers
          )
  
imports: import tensorflow
  from niftynet.application.base_application import BaseApplication
  from niftynet.engine.application_factory import ApplicationNetFactory, InitializerFactory, OptimiserFactory
  from niftynet.engine.application_variables import CONSOLE, NETWORK_OUTPUT, TF_SUMMARIES
  from niftynet.engine.sampler_grid_v2 import GridSampler
  from niftynet.engine.sampler_resize_v2 import ResizeSampler
  from niftynet.engine.sampler_uniform_v2 import UniformSampler
  from niftynet.engine.sampler_weighted_v2 import WeightedSampler
  from niftynet.engine.sampler_balanced_v2 import BalancedSampler
  from niftynet.engine.windows_aggregator_grid import GridSamplesAggregator
  from niftynet.engine.windows_aggregator_resize import ResizeSamplesAggregator
  from niftynet.io.image_reader import ImageReader
  from niftynet.layer.crop import CropLayer
  from niftynet.layer.histogram_normalisation import HistogramNormalisationLayer
  from niftynet.layer.loss_regression import LossFunction
  from niftynet.layer.mean_variance_normalisation import MeanVarNormalisationLayer
  from niftynet.layer.pad import PadLayer
  from niftynet.layer.post_processing import PostProcessingLayer
  from niftynet.layer.rand_flip import RandomFlipLayer
  from niftynet.layer.rand_rotation import RandomRotationLayer
  from niftynet.layer.rand_spatial_scaling import RandomSpatialScalingLayer
  from niftynet.layer.rgb_histogram_equilisation import RGBHistogramEquilisationLayer
  from niftynet.evaluation.regression_evaluator import RegressionEvaluator
  from niftynet.layer.rand_elastic_deform import RandomElasticDeformationLayer
  from niftynet.contrib.csv_reader.csv_reader import CSVReader
  from niftynet.contrib.csv_reader.sampler_resize_v2_csv import ResizeSamplerCSV
  from niftynet.contrib.csv_reader.sampler_grid_v2_csv import GridSamplerCSV
  from niftynet.contrib.csv_reader.sampler_uniform_v2_csv import UniformSamplerCSV
  from niftynet.contrib.csv_reader.sampler_weighted_v2_csv import WeightedSamplerCSV
  from niftynet.contrib.csv_reader.sampler_balanced_v2_csv import BalancedSamplerCSV
label_desc: Use image node_id 2 for calling the RegressionApplication obj's underlying member method code with example usage: obj.initialise_dataset_loader(data_param, task_param, data_partitioner) without return types