docstr: Given a list of Instances, generate a new list of perturbed Instances.
  include_original controls whether to include the original Instance in the new list of Instances.
  skip_unchanged controls whether we include instances for which the perturbation did not change the input.
docstr_tok: ["Given","a","list","of","Instances",",","generate","a","new","list","of","perturbed","Instances",".","include_original","controls","whether","to","include","the","original","Instance","in","the","new","list","of","Instances",".","skip_unchanged","controls","whether","we","include","instances","for","which","the","perturbation","did","not","change","the","input","."]
code: def generate(
      self,
      instances: List[Instance],
      include_original: bool = True,
      skip_unchanged: bool = False,
      seeds_per_instance: int = 1,
      parallelism: int = 1,
  ) -> List[Instance]:
      """
      Given a list of Instances, generate a new list of perturbed Instances.
      include_original controls whether to include the original Instance in the new list of Instances.
      skip_unchanged controls whether we include instances for which the perturbation did not change the input.
      """
      processor = Processor(
          include_original=include_original,
          skip_unchanged=skip_unchanged,
          perturbations=self.perturbations,
          seeds_per_instance=seeds_per_instance,
      )
      results: List[List[Instance]] = parallel_map(
          processor.process,
          instances,
          parallelism=parallelism,
      )
      output_instances = [
          instance for result in results for instance in result
      ]
  
      hlog(
          f"{len(instances)} instances augmented to {len(output_instances)} instances"
      )
      return output_instances
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/augmentations/data_augmenter.py
imports: from dataclasses import dataclass, field
  from typing import List
  from helm.common.hierarchical_logger import htrack, hlog
  from helm.common.general import parallel_map
  from helm.benchmark.augmentations.perturbation import Perturbation, PerturbationSpec, create_perturbation
  from helm.benchmark.scenarios.scenario import Instance
label_desc: Use image node_id 1 for calling the DataAugmenter obj's underlying member method code with example usage: obj.generate(instances, include_original, skip_unchanged, seeds_per_instance, parallelism) and returns: output_instances