code: def test_scheduler_created_record_from_scheduler(self) -> None:
      scheduler = Scheduler(
          experiment=get_branin_experiment(),
          generation_strategy=get_generation_strategy(),
          options=SchedulerOptions(
              total_trials=0,
              tolerated_trial_failure_rate=0.2,
              init_seconds_between_polls=10,
          ),
      )
  
      record = SchedulerCreatedRecord.from_scheduler(
          scheduler=scheduler
      )
  
      expected = SchedulerCreatedRecord(
          experiment_created_record=ExperimentCreatedRecord.from_experiment(
              experiment=scheduler.experiment
          ),
          generation_strategy_created_record=(
              GenerationStrategyCreatedRecord.from_generation_strategy(
                  generation_strategy=scheduler.standard_generation_strategy
              )
          ),
          scheduler_total_trials=0,
          scheduler_max_pending_trials=10,
          arms_per_trial=1,
          early_stopping_strategy_cls=None,
          global_stopping_strategy_cls=None,
          transformed_dimensionality=2,
      )
      self.assertEqual(record, expected)
  
      flat = record.flatten()
      expected_dict = {
          **ExperimentCreatedRecord.from_experiment(
              experiment=scheduler.experiment
          ).__dict__,
          **GenerationStrategyCreatedRecord.from_generation_strategy(
              generation_strategy=scheduler.standard_generation_strategy
          ).__dict__,
          "scheduler_total_trials": 0,
          "scheduler_max_pending_trials": 10,
          "arms_per_trial": 1,
          "early_stopping_strategy_cls": None,
          "global_stopping_strategy_cls": None,
          "transformed_dimensionality": 2,
      }
      self.assertEqual(flat, expected_dict)
  
imports: from typing import cast, Dict
  from unittest import mock
  from ax.core.experiment import Experiment
  from ax.core.objective import Objective
  from ax.core.optimization_config import OptimizationConfig
  from ax.metrics.branin import BraninMetric
  from ax.modelbridge.generation_strategy import GenerationStep, GenerationStrategy
  from ax.modelbridge.registry import Models
  from ax.runners.synthetic import SyntheticRunner
  from ax.service.scheduler import get_fitted_model_bridge, Scheduler, SchedulerOptions
  from ax.telemetry.experiment import ExperimentCompletedRecord, ExperimentCreatedRecord
  from ax.telemetry.generation_strategy import GenerationStrategyCreatedRecord
  from ax.telemetry.scheduler import SchedulerCompletedRecord, SchedulerCreatedRecord
  from ax.utils.common.constants import Keys
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_branin_experiment, get_branin_search_space
  from ax.utils.testing.modeling_stubs import get_generation_strategy
label_desc: Use image node_id 1 for calling the TestScheduler obj's underlying member method code with example usage: obj.test_scheduler_created_record_from_scheduler() without return types