code: def __init__(
      self,
      *,
      mutation_prob: float | None = None,
      crossover: BaseCrossover,
      crossover_prob: float,
      swapping_prob: float,
      constraints_func: Callable[[FrozenTrial], Sequence[float]]
      | None = None,
      rng: LazyRandomState,
  ) -> None:
      if not (mutation_prob is None or 0.0 <= mutation_prob <= 1.0):
          raise ValueError(
              "`mutation_prob` must be None or a float value within the range [0.0, 1.0]."
          )
  
      if not (0.0 <= crossover_prob <= 1.0):
          raise ValueError(
              "`crossover_prob` must be a float value within the range [0.0, 1.0]."
          )
  
      if not (0.0 <= swapping_prob <= 1.0):
          raise ValueError(
              "`swapping_prob` must be a float value within the range [0.0, 1.0]."
          )
  
      if not isinstance(crossover, BaseCrossover):
          raise ValueError(
              f"'{crossover}' is not a valid crossover."
              " For valid crossovers see"
              " https://optuna.readthedocs.io/en/stable/reference/samplers.html."
          )
  
      self._crossover_prob = crossover_prob
      self._mutation_prob = mutation_prob
      self._swapping_prob = swapping_prob
      self._crossover = crossover
      self._constraints_func = constraints_func
      self._rng = rng
  
file_path: optuna/optuna/samplers/nsgaii/_child_generation_strategy.py
imports: from __future__ import annotations
  from collections.abc import Callable
  from collections.abc import Sequence
  from typing import Any
  from optuna.distributions import BaseDistribution
  from optuna.samplers._lazy_random_state import LazyRandomState
  from optuna.samplers.nsgaii._crossover import perform_crossover
  from optuna.samplers.nsgaii._crossovers._base import BaseCrossover
  from optuna.samplers.nsgaii._dominates import _constrained_dominates
  from optuna.study import Study
  from optuna.study._multi_objective import _dominates
  from optuna.trial import FrozenTrial
label_desc: Use image node_id 1 to create a new NSGAIIChildGenerationStrategy object  with example: obj = NSGAIIChildGenerationStrategy()