code: def format_search_space(
      search_space: SearchSpace,
  ) -> FormattedSearchSpace:
      """
      Convert user provided search space into a dict of ParameterSpec.
      The dict key is dict value's `ParameterSpec.key`.
      """
      formatted = _format_search_space(tuple(), search_space)
      return {spec.key: spec for spec in formatted}
  
file_path: nni/nni/common/hpo_utils/formatting.py
imports: from __future__ import annotations
  import math
  from types import SimpleNamespace
  from typing import Any, Dict, NamedTuple, Tuple, cast
  import numpy
  from nni.typehint import Parameters, SearchSpace
label_desc: Use image node_id 1 for calling a global function with example usage: format_search_space(search_space) and returns: unknown