code: def parsing_data():
      parser = argparse.ArgumentParser(
          description="3D Segmentation Using PyTorch and NiftyNet"
      )
      parser.add_argument(
          "-data_split_file",
          default="train_val_infer_split.csv",
          type=str,
          help="output csv filename",
      )
      parser.add_argument(
          "-patch_size",
          default=(64, 64, 64),
          type=tuple,
          help="patch size",
      )
      parser.add_argument(
          "-in_channels", default=1, type=int, help="# of data channels"
      )
      parser.add_argument(
          "-n_classes", default=1, type=int, help="# of output classes"
      )
      parser.add_argument(
          "-num_epochs", default=1, type=int, help="# of epochs"
      )
      parser.add_argument(
          "-lr", default=1e-4, type=float, help="learning rate"
      )
      parser.add_argument(
          "-ratios",
          default=[0.1, 0.1],
          type=list,
          help="ratio for validation and inference sets",
      )
      parser.add_argument(
          "-batch_size", default=4, type=int, help="batch size"
      )
      parser.add_argument(
          "-cp_path",
          default="./CP.pth",
          type=str,
          help="checkpoint output filename",
      )
      parser.add_argument(
          "-image_path",
          default="/home/oeslle/Documents/Datasets/CC359_NEW/Original",
          type=str,
          help="image path",
      )
      parser.add_argument(
          "-label_path",
          default="/home/oeslle/Documents/Datasets/CC359_NEW/STAPLE-binary",
          type=str,
          help="label path",
      )
      parser.add_argument(
          "-pred_path",
          default="/home/oeslle/Documents/pred_seg_brain",
          type=str,
          help="output path for inferences",
      )
  
      opt = parser.parse_args()
  
      return opt
  
imports: import argparse
  import time
  import numpy
  import torch
  import torch.optim
  from libs import dataset_niftynet
  from libs import loss
  from libs import model
  from torch.utils.data import DataLoader
  from niftynet.engine.sampler_grid_v2 import GridSampler
  from niftynet.engine.sampler_uniform_v2 import UniformSampler
  from niftynet.engine.signal import TRAIN, VALID, INFER
  from niftynet.engine.windows_aggregator_grid import GridSamplesAggregator
  from niftynet.evaluation.pairwise_measures import PairwiseMeasures
  from niftynet.io.image_reader import ImageReader
  from niftynet.io.image_sets_partitioner import ImageSetsPartitioner
  from niftynet.layer.mean_variance_normalisation import MeanVarNormalisationLayer
  from niftynet.layer.pad import PadLayer
label_desc: Use image node_id 6 for calling a global function with example usage: parsing_data() and returns: opt