class_docstr: Record of the GenerationStrategy creation event. This can be used for telemetry in
  settings where many GenerationStrategy are being created either manually or
  programatically. In order to facilitate easy serialization only include simple
  types: numbers, strings, bools, and None.
code: def from_generation_strategy(
      cls, generation_strategy: GenerationStrategy
  ) -> GenerationStrategyCreatedRecord:
      # Minimum `max_parallelism` across GenerationSteps, i.e. the bottleneck
      true_max_parallelism = min(
          step.max_parallelism or inf
          for step in generation_strategy._steps
      )
  
      return cls(
          generation_strategy_name=generation_strategy.name,
          num_requested_initialization_trials=sum(
              step.num_trials
              for step in generation_strategy._steps
              if step.model in INITIALIZATION_MODELS
          ),
          num_requested_bayesopt_trials=sum(
              step.num_trials
              for step in generation_strategy._steps
              if step.model not in INITIALIZATION_MODELS + OTHER_MODELS
          ),
          num_requested_other_trials=sum(
              step.num_trials
              for step in generation_strategy._steps
              if step.model in OTHER_MODELS
          ),
          max_parallelism=true_max_parallelism
          if isinstance(true_max_parallelism, int)
          else -1,
      )
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from math import inf
  from ax.modelbridge.generation_strategy import GenerationStrategy
  from ax.telemetry.common import INITIALIZATION_MODELS, OTHER_MODELS
label_desc: Use image node_id 1 for calling the GenerationStrategyCreatedRecord obj's underlying member method code with example usage: obj.from_generation_strategy(cls, generation_strategy) and returns: cls