class_docstr: This is a lightweight stateless class that bundles together instantiation utils.
  It is used both on its own and as a mixin to AxClient, with the intent that
  these methods can be overridden by its subclasses for specific use cases.
class_docstr_tok: ["This","is","a","lightweight","stateless","class","that","bundles","together","instantiation","utils",".","It","is","used","both","on","its","own","and","as","a","mixin","to","AxClient",",","with","the","intent","that","these","methods","can","be","overridden","by","its","subclasses","for","specific","use","cases","."]
code: def make_search_space(
      cls,
      parameters: List[TParameterRepresentation],
      parameter_constraints: Optional[List[str]],
  ) -> SearchSpace:
      parameter_constraints = (
          parameter_constraints
          if parameter_constraints is not None
          else []
      )
      typed_parameters = [
          cls.parameter_from_json(p) for p in parameters
      ]
      is_hss = any(p.is_hierarchical for p in typed_parameters)
      search_space_cls = (
          HierarchicalSearchSpace if is_hss else SearchSpace
      )
  
      parameter_map = {p.name: p for p in typed_parameters}
  
      typed_parameter_constraints = [
          cls.constraint_from_str(c, parameter_map)
          for c in parameter_constraints
      ]
  
      if any(
          any(
              isinstance(parameter_map[parameter], ChoiceParameter)
              for parameter in constraint.constraint_dict
          )
          for constraint in typed_parameter_constraints
      ):
          raise UnsupportedError(
              "Constraints on ChoiceParameters are not allowed. Try absorbing "
              "this constraint into the associated range parameter's bounds."
          )
  
      if any(
          any(
              isinstance(parameter_map[parameter], FixedParameter)
              for parameter in constraint.constraint_dict
          )
          for constraint in typed_parameter_constraints
      ):
          raise UnsupportedError(
              "Constraints on FixedParameters are not allowed. Try absorbing "
              "this constraint into the associated range parameter's bounds."
          )
  
      ss = search_space_cls(
          parameters=typed_parameters,
          parameter_constraints=typed_parameter_constraints,
      )
  
      logger.info(f"Created search space: {ss}.")
      if is_hss:
          hss = checked_cast(HierarchicalSearchSpace, ss)
          logger.info(
              "Hieararchical structure of the search space: \n"
              f"{hss.hierarchical_structure_str(parameter_names_only=True)}"
          )
  
      return search_space_cls(
          parameters=typed_parameters,
          parameter_constraints=typed_parameter_constraints,
      )
  
imports: import enum
  from dataclasses import dataclass
  from logging import Logger
  from typing import Any, Dict, List, Optional, Sequence, Type, Union
  from ax.core.arm import Arm
  from ax.core.experiment import DataType, DEFAULT_OBJECTIVE_NAME, Experiment
  from ax.core.map_metric import MapMetric
  from ax.core.metric import Metric
  from ax.core.objective import MultiObjective, Objective
  from ax.core.observation import ObservationFeatures
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig, ObjectiveThreshold, OptimizationConfig
  from ax.core.outcome_constraint import OutcomeConstraint
  from ax.core.parameter import ChoiceParameter, FixedParameter, Parameter, PARAMETER_PYTHON_TYPE_MAP, ParameterType, RangeParameter, TParameterType
  from ax.core.parameter_constraint import OrderConstraint, ParameterConstraint
  from ax.core.search_space import HierarchicalSearchSpace, SearchSpace
  from ax.core.types import ComparisonOp, TParameterization, TParamValue
  from ax.exceptions.core import UnsupportedError
  from ax.utils.common.constants import Keys
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast, checked_cast_optional, checked_cast_to_tuple, not_none
label_desc: Use image node_id 18 for calling the InstantiationBase obj's underlying member method code with example usage: obj.make_search_space(cls, parameters, parameter_constraints) and returns: search_space_cls