code: def preload(
      self,
      samples: List[Sample],
      num_processes=1,
      drop_invalid=True,
      progress_bar=False,
  ) -> Iterable[Sample]:
      n_augmentation = (
          self.data_aug_params.to_abs()
      )  # real number of augmentations
      if n_augmentation == 0:
          return samples
  
      apply_fn = partial(
          self.multi_augment,
          n_augmentations=n_augmentation,
          include_non_augmented=True,
      )
      augmented_samples = parallel_map(
          apply_fn,
          samples,
          desc="Augmenting data",
          processes=num_processes,
          progress_bar=progress_bar,
      )
      augmented_samples = sum(list(augmented_samples), [])  # Flatten
      return augmented_samples
  
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 2 for calling the AugmentationProcessor obj's underlying member method code with example usage: obj.preload(samples, num_processes, drop_invalid, progress_bar) and returns: augmented_samples, samples