docstr: Generates a new Reference by perturbing the output and tagging the Reference.
docstr_tok: ["Generates","a","new","Reference","by","perturbing","the","output","and","tagging","the","Reference","."]
code: def perturb_reference(
      self, reference: Reference, rng: Random
  ) -> Reference:
      """Generates a new Reference by perturbing the output and tagging the Reference."""
      return replace(
          reference,
          output=Output(text=self.perturb(reference.output.text, rng)),
          tags=reference.tags,
      )
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/augmentations/perturbation.py
imports: from abc import ABC, abstractmethod
  from dataclasses import replace
  from random import Random
  from typing import List, Optional
  from .perturbation_description import PerturbationDescription
  from helm.benchmark.scenarios.scenario import Input, Instance, Reference, Output
  from helm.common.object_spec import ObjectSpec, create_object
label_desc: Use image node_id 4 for calling the Perturbation obj's underlying member method code with example usage: obj.perturb_reference(reference, rng) and returns: replace