code: def deserialize_compression_proposal(
      config, compression_params, proposal
  ):
      """
      Helper function used to deserialize a proposal meant for compression from its usual
      HPO format into a NNI-compatible config_list format.
      The output of this function is normally passed to the user script, where it is loaded
      using BasicConfig.
  
      :param config: full experiment config
      :type config: dict
      :param compression_params: list of names of compression params to filter proposal by
      :type compression_params: list
      :param proposal: proposal generated by an auptimizer proposer
      :type proposal: dict
      :return: deserialized job configuration
      :rtype: dict
      """
      new_proposal = config["compression"].copy()
      for param in compression_params:
          full_param = param.split(SERIALIZATION_SEPARATOR)
          index = int(
              full_param[0]
          )  # the first string until . is always the config_list index
          original_key = full_param[
              -1
          ]  # the last string is always the original key of the config_list entry
          cdict = new_proposal["config_list"][index]
          # Parse the config_list entry recursively until arriving at max depth
          for part in full_param[1:-1]:
              cdict = cdict[part]
          cdict[original_key] = proposal[
              param
          ]  # assign the actual proposed value for the param, instead of the hyperparameter "range" and "type" format
      new_proposal.update(
          {
              key: val
              for key, val in proposal.items()
              if key not in compression_params
          }
      )
      return new_proposal
  
file_path: auptimizer/src/aup/compression/utils.py
imports: import json
  import logging
  import signal
  import sys
  import _thread
  import threading
  import time
  from ..EE.Resource import get_resource_manager
  from ..aup import BasicConfig
  from ..EE.Job import Job
  from ..utils import get_default_username, get_default_connector, check_missing_key
label_desc: Use image node_id 5 for calling a global function with example usage: deserialize_compression_proposal(config, compression_params, proposal) and returns: new_proposal