code: def _read_per_instance_stats(run_path: str) -> List[PerInstanceStats]:
      per_instance_stats_path: str = os.path.join(
          run_path, "per_instance_stats.json"
      )
      if not os.path.exists(per_instance_stats_path):
          raise ValueError(
              f"Could not load PerInstanceStats from {per_instance_stats_path}"
          )
      with open(per_instance_stats_path) as f:
          return from_json(f.read(), List[PerInstanceStats])
  
imports: from collections import OrderedDict, defaultdict
  from dataclasses import dataclass
  import os
  from typing import Dict, Iterable, List, Optional, Set, Tuple
  from helm.benchmark.adaptation.adapters.adapter_factory import ADAPT_MULTIPLE_CHOICE_SEPARATE_METHODS, ADAPT_MULTIPLE_CHOICE_SEPARATE_CALIBRATED
  from helm.benchmark.adaptation.adapter_spec import AdapterSpec
  from helm.benchmark.adaptation.request_state import RequestState
  from helm.benchmark.adaptation.scenario_state import ScenarioState
  from helm.benchmark.augmentations.perturbation_description import PerturbationDescription
  from helm.benchmark.metrics.metric import PerInstanceStats
  from helm.benchmark.presentation.schema import Schema
  from helm.benchmark.runner import RunSpec
  from helm.benchmark.scenarios.scenario import Instance
  from helm.common.general import write
  from helm.common.hierarchical_logger import htrack
  from helm.common.request import Request
  from helm.common.codec import from_json, to_json
label_desc: Use image node_id 2 for calling a global function with example usage: _read_per_instance_stats(run_path) and returns: from_json