class_docstr: Attributes determining groups of Instances we want to be aggregating over.
code: def from_instance(cls, instance: Instance):
      return cls(
          split=instance.split,
          sub_split=instance.sub_split,
          perturbation=instance.perturbation,
      )
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/metrics/metric_name.py
imports: from dataclasses import dataclass
  from typing import Optional
  from helm.benchmark.augmentations.perturbation_description import PerturbationDescription
  from helm.benchmark.scenarios.scenario import Instance
label_desc: Use image node_id 1 for calling the MetricContext obj's underlying member method code with example usage: obj.from_instance(cls, instance) and returns: cls