code: def perform_crossover(
      crossover: BaseCrossover,
      study: Study,
      parent_population: Sequence[FrozenTrial],
      search_space: Dict[str, BaseDistribution],
      rng: np.random.RandomState,
      swapping_prob: float,
      dominates: Callable[
          [FrozenTrial, FrozenTrial, Sequence[StudyDirection]], bool
      ],
  ) -> Dict[str, Any]:
      numerical_search_space: Dict[str, BaseDistribution] = {}
      categorical_search_space: Dict[str, BaseDistribution] = {}
      for key, value in search_space.items():
          if isinstance(value, _NUMERICAL_DISTRIBUTIONS):
              numerical_search_space[key] = value
          else:
              categorical_search_space[key] = value
  
      numerical_transform: Optional[_SearchSpaceTransform] = None
      if len(numerical_search_space) != 0:
          numerical_transform = _SearchSpaceTransform(
              numerical_search_space
          )
  
      while (
          True
      ):  # Repeat while parameters lie outside search space boundaries.
          parents = _select_parents(
              crossover, study, parent_population, rng, dominates
          )
          child_params = _try_crossover(
              parents,
              crossover,
              study,
              rng,
              swapping_prob,
              categorical_search_space,
              numerical_search_space,
              numerical_transform,
          )
  
          if _is_contained(child_params, search_space):
              break
  
      return child_params
  
imports: from typing import Any
  from typing import Callable
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Sequence
  import numpy
  from optuna._transform import _SearchSpaceTransform
  from optuna.distributions import BaseDistribution
  from optuna.distributions import FloatDistribution
  from optuna.distributions import IntDistribution
  from optuna.samplers.nsgaii._crossovers._base import BaseCrossover
  from optuna.study import Study
  from optuna.study import StudyDirection
  from optuna.trial import FrozenTrial
label_desc: Use image node_id 2 for calling a global function with example usage: perform_crossover(crossover, study, parent_population, search_space, rng, swapping_prob, dominates) and returns: child_params