code: def config_v0_to_v1(config: dict) -> dict:
      if "clusterMetaData" not in config:
          return config
      elif "trainingServicePlatform" in config:
          import copy
  
          experiment_config = copy.deepcopy(config)
          if experiment_config["trainingServicePlatform"] == "hybrid":
              inverse_config = {
                  "hybridConfig": experiment_config["clusterMetaData"][
                      "hybrid_config"
                  ]
              }
              platform_list = inverse_config["hybridConfig"][
                  "trainingServicePlatforms"
              ]
              for platform in platform_list:
                  inverse_config.update(
                      _inverse_cluster_metadata(
                          platform, experiment_config["clusterMetaData"]
                      )
                  )
              experiment_config.update(inverse_config)
          else:
              inverse_config = _inverse_cluster_metadata(
                  experiment_config["trainingServicePlatform"],
                  experiment_config["clusterMetaData"],
              )
              experiment_config.update(inverse_config)
          experiment_config.pop("clusterMetaData")
          return experiment_config
      else:
          raise RuntimeError(
              "experiment config key `trainingServicePlatform` not found"
          )
  
file_path: nni/nni/tools/nnictl/config_utils.py
imports: import os
  import sqlite3
  import nni
  from .constants import NNI_HOME_DIR
  from .common_utils import get_file_lock
label_desc: Use image node_id 1 for calling a global function with example usage: config_v0_to_v1(config) and returns: config, experiment_config