code: def apply(self, sample: Sample) -> Sample:
      # data augmentation
      if (
          not self.data_aug_params.no_augs()
          and sample.inputs is not None
          and self.data_augmenter
          and np.random.rand() <= self.data_aug_params.to_rel()
      ):
          line, text = self.augment(
              sample.inputs, sample.targets, sample.meta
          )
          return sample.new_inputs(line).new_targets(text)
      return sample
  
imports: import copy
  from dataclasses import dataclass, field
  from functools import partial
  from typing import List, Iterable, Type
  import numpy
  from paiargparse import pai_dataclass, pai_meta
  from tfaip.data.pipeline.definitions import Sample
  from tfaip.data.pipeline.processor.dataprocessor import MappingDataProcessor, DataProcessorParams
  from tfaip.util.multiprocessing.parallelmap import parallel_map
  from calamari_ocr.ocr.augmentation.data_augmenter import DataAugmenterParams, DefaultDataAugmenterParams
  from calamari_ocr.ocr.augmentation.dataaugmentationparams import DataAugmentationAmount
label_desc: Use image node_id 3 for calling the AugmentationProcessor obj's underlying member method code with example usage: obj.apply(sample) and returns: sample, sample