code: def test_optimization_completed_record_from_ax_client(self) -> None:
      ax_client = AxClient()
      ax_client.create_experiment(
          name="test_experiment",
          parameters=[
              {"name": "x", "type": "range", "bounds": [-5.0, 10.0]},
              {"name": "y", "type": "range", "bounds": [0.0, 15.0]},
          ],
          objectives={"branin": ObjectiveProperties(minimize=True)},
          is_test=True,
      )
  
      record = OptimizationCompletedRecord.from_ax_client(
          ax_client=ax_client,
          unique_identifier="foo",
          deployed_job_id=1118,
          estimated_early_stopping_savings=19,
          estimated_global_stopping_savings=98,
      )
      expected_dict = {
          **AxClientCompletedRecord.from_ax_client(
              ax_client=ax_client
          ).flatten(),
          "unique_identifier": "foo",
          "deployed_job_id": 1118,
          "estimated_early_stopping_savings": 19,
          "estimated_global_stopping_savings": 98,
          # Extra fields
          "improvement_over_baseline": float("-inf"),
          "num_metric_fetch_e_encountered": -1,
          "num_trials_bad_due_to_err": -1,
      }
  
      self.assertEqual(asdict(record), expected_dict)
  
imports: from dataclasses import asdict
  from datetime import datetime
  from ax.service.ax_client import AxClient, ObjectiveProperties
  from ax.service.scheduler import Scheduler, SchedulerOptions
  from ax.telemetry.ax_client import AxClientCompletedRecord, AxClientCreatedRecord
  from ax.telemetry.experiment import ExperimentCreatedRecord
  from ax.telemetry.generation_strategy import GenerationStrategyCreatedRecord
  from ax.telemetry.optimization import OptimizationCompletedRecord, OptimizationCreatedRecord
  from ax.telemetry.scheduler import SchedulerCompletedRecord, SchedulerCreatedRecord
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_branin_experiment
  from ax.utils.testing.modeling_stubs import get_generation_strategy
label_desc: Use image node_id 6 for calling the TestOptimization obj's underlying member method code with example usage: obj.test_optimization_completed_record_from_ax_client() without return types