code: def expand_path(experiment_config, key):
      """Change '~' to user home directory"""
      if experiment_config.get(key):
          experiment_config[key] = os.path.expanduser(
              experiment_config[key]
          )
  
file_path: nni/nni/tools/nnictl/launcher_utils.py
imports: import os
  from schema import SchemaError
  from .config_schema import NNIConfigSchema
  from .common_utils import print_normal
label_desc: Use image node_id 1 for calling a global function with example usage: expand_path(experiment_config, key) without return types