code: def test_synonym_perturbation():
      data_augmenter = DataAugmenter(
          perturbations=[SynonymPerturbation(prob=1.0)]
      )
      instance: Instance = Instance(
          id="id0",
          input=Input(text="This was a good movie, would watch again."),
          references=[],
      )
      instances: List[Instance] = data_augmenter.generate(
          [instance], include_original=True
      )
  
      assert len(instances) == 2
      assert instances[1].perturbation.name == "synonym"
      assert instances[1].perturbation.prob == 1.0
      assert (
          instances[1].input.text
          == "This was a near motion-picture show, would check once more."
      )
  
imports: from typing import List
  from helm.benchmark.scenarios.scenario import Input, Instance, Output, Reference
  from .data_augmenter import DataAugmenter
  from .extra_space_perturbation import ExtraSpacePerturbation
  from .misspelling_perturbation import MisspellingPerturbation
  from .contraction_expansion_perturbation import ContractionPerturbation, ExpansionPerturbation
  from .typos_perturbation import TyposPerturbation
  from .filler_words_perturbation import FillerWordsPerturbation
  from .synonym_perturbation import SynonymPerturbation
  from .lowercase_perturbation import LowerCasePerturbation
  from .space_perturbation import SpacePerturbation
  from .dialect_perturbation import DialectPerturbation
  from .person_name_perturbation import PersonNamePerturbation
  from .gender_perturbation import GenderPerturbation
label_desc: Use image node_id 7 for calling a global function with example usage: test_synonym_perturbation() without return types