code: def dict2x(self, para):
      # convert para(dict) to X
      types = self.get_type()
  
      def one_hot(ind, leng):
          fin = [0 for i in range(leng)]
          fin[ind] = 1
          return fin
  
      X_fin = []
      ind = 0
      for name, length, arg_typ in zip(
          self.arg_name, self.arg_len, self.arg_typ
      ):
          if arg_typ == "value":
              X_fin.append(para[name])
          else:
              max_ind = self.id2cate[name][para[name]]
              X_fin.extend(one_hot(max_ind, length))
          ind += length
  
      return X_fin
  
imports: import random
  import os
  import sys
  import collections
  import itertools
  import pickle
  import scipy.sparse
  import networkx
  import numpy
  from sklearn.cluster import SpectralClustering
  from sklearn import gaussian_process
  from scipy.optimize import minimize
  from bayes_opt import BayesianOptimization
label_desc: Use image node_id 6 for calling the Params obj's underlying member method code with example usage: obj.dict2x(para) and returns: X_fin, fin