code: def rep_task(hist_tasks, curr_task):
      """Represent search space as matrix"""
      hpp_idx_map = {}
      # idx_hpp_map = {}
      curr_bound = np.zeros(
          (2, len(curr_task["space"]))
      )  # 0: lower, 1: upper
      hist_opt = np.zeros((len(hist_tasks), len(curr_task["space"])))
  
      for i in range(len(curr_task["space"])):
          value_item = next(iter(curr_task["space"][i].values()))
          key_item = next(iter(curr_task["space"][i].keys()))
          hpp_idx_map[key_item] = i
          # idx_hpp_map[i] = key_item
          curr_bound[0, i] = value_item[0]
          curr_bound[1, i] = value_item[1]
  
      for i in range(len(hist_tasks)):
          for j in range(len(hist_tasks[i]["params"])):
              hist_opt[
                  i, hpp_idx_map[hist_tasks[i]["params"][j]["name"]]
              ] = hist_tasks[i]["params"][j]["value"]
  
      return hist_opt, curr_bound
  
imports: import logging
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: rep_task(hist_tasks, curr_task) and returns: hist_opt,  curr_bound