code: def json2parameter(in_x, parameter, name=NodeType.ROOT):
      """
      Change json to parameters.
      """
      out_y = copy.deepcopy(in_x)
      if isinstance(in_x, dict):
          if NodeType.TYPE in in_x.keys():
              _type = in_x[NodeType.TYPE]
              name = name + "-" + _type
              if _type == "choice":
                  _index = parameter[name]
                  out_y = {
                      NodeType.INDEX: _index,
                      NodeType.VALUE: json2parameter(
                          in_x[NodeType.VALUE][_index],
                          parameter,
                          name=name + "[%d]" % _index,
                      ),
                  }
              else:
                  if _type in ["quniform", "qloguniform"]:
                      out_y = np.clip(
                          parameter[name],
                          in_x[NodeType.VALUE][0],
                          in_x[NodeType.VALUE][1],
                      )
                  elif _type == "randint":
                      out_y = parameter[name] + in_x[NodeType.VALUE][0]
                  else:
                      out_y = parameter[name]
          else:
              out_y = dict()
              for key in in_x.keys():
                  out_y[key] = json2parameter(
                      in_x[key], parameter, name + "[%s]" % str(key)
                  )
      elif isinstance(in_x, list):
          out_y = list()
          for i, x_i in enumerate(in_x):
              if isinstance(x_i, dict):
                  if NodeType.NAME not in x_i.keys():
                      raise RuntimeError(
                          "'_name' key is not found in this nested search space."
                      )
              out_y.append(
                  json2parameter(x_i, parameter, name + "[%d]" % i)
              )
      return out_y
  
imports: import copy
  import logging
  import hyperopt
  import numpy
  from schema import Optional, Schema
  from nni import ClassArgsValidator
  from nni.common.hpo_utils import validate_search_space
  from nni.tuner import Tuner
  from nni.utils import NodeType, OptimizeMode, extract_scalar_reward, split_index
label_desc: Use image node_id 2 for calling a global function with example usage: json2parameter(in_x, parameter, name) and returns: out_y