code: def _extract_model_fit_dict(
      completed_record: Union[
          SchedulerCompletedRecord, AxClientCompletedRecord
      ],
  ) -> Dict[str, float]:
      model_fit_names = [
          "model_fit_quality",
          "model_std_quality",
          "model_fit_generalization",
          "model_std_generalization",
      ]
      return {n: getattr(completed_record, n) for n in model_fit_names}
  
file_path: Ax/ax/telemetry/optimization.py
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import Dict, Optional, Union
  from ax.core.experiment import Experiment
  from ax.modelbridge.generation_strategy import GenerationStrategy
  from ax.service.ax_client import AxClient
  from ax.service.scheduler import Scheduler
  from ax.telemetry.ax_client import AxClientCompletedRecord, AxClientCreatedRecord
  from ax.telemetry.common import _get_max_transformed_dimensionality, DEFAULT_PRODUCT_SURFACE, get_unique_identifier
  from ax.telemetry.experiment import ExperimentCreatedRecord
  from ax.telemetry.generation_strategy import GenerationStrategyCreatedRecord
  from ax.telemetry.scheduler import SchedulerCompletedRecord, SchedulerCreatedRecord
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_model_fit_dict(completed_record) and returns: unknown