code: def test():
      config = {
          "encoder": [
              {
                  "parameterName": "num_layers",
                  "type": "DISCRETE",
                  "feasiblePoints": "1,2,3,4",
              },
              {
                  "parameterName": "hidden",
                  "type": "NUMERICAL_LIST",
                  "numericalType": "INTEGER",
                  "length": 4,
                  "cutPara": "num_layers",
                  "cutFunc": lambda x: x[0],
                  "minValue": [4, 4, 4, 4],
                  "maxValue": [32, 32, 32, 32],
                  "scalingType": "LOG",
              },
              {
                  "parameterName": "dropout",
                  "type": "DOUBLE",
                  "minValue": 0.1,
                  "maxValue": 0.9,
                  "scalingType": "LINEAR",
              },
          ],
          "decoder": [
              {
                  "parameterName": "dropout",
                  "type": "DOUBLE",
                  "minValue": 0.1,
                  "maxValue": 0.9,
                  "scalingType": "LINEAR",
              }
          ],
      }
      bhpo = BaseHPOptimizer()
      newconf = bhpo._encode_para(config)
      print(newconf)
  
      para = {}
      for i in newconf:
          if i["type"] == "DISCRETE":
              para[i["parameterName"]] = int(
                  random.choice(i["feasiblePoints"].split(","))
              )
          else:
              para[i["parameterName"]] = i[
                  "minValue"
              ] + random.random() * (i["maxValue"] - i["minValue"])
      newpara = bhpo._decode_para(para)[0]
      print(newpara)
  
imports: from ...utils import get_logger
  import hyperopt
  import time
  import math
  import dill
  import multiprocessing
  import copy
  import random
label_desc: Use image node_id 1 for calling a global function with example usage: test() without return types