code: def main(exp, aup, log, overwrite, reload):
      """Initialize experiment configuration for HPO
      \b\n
      Copyright (C) 2018  LG Electronics Inc.
      \b\n
      GPL-3.0 License. This program comes with ABSOLUTELY NO WARRANTY;
      \b\n
      Raises:
          Exception: If Auptimizer environment is not found.
      """
      coloredlogs.install(
          level=LOG_LEVEL[log],
          fmt="%(name)s - %(levelname)s - %(message)s",
      )
  
      if os.path.isfile(exp) and not overwrite and not reload:
          logger.fatal(
              "%s exists! Overwrite (-o) or change experiment name (-e)!",
              exp,
          )
          exit(1)
  
      try:
          conn = get_default_connector(auppath=aup)
      except Exception as e:
          logger.fatal(
              "Failed to get environment file, check aup.setup process"
          )
          raise e
  
      config = defaultdict(str)
      if reload:
          with open(exp, "r") as f:
              config.update(json.load(f))
      try:
          print("Hit ENTER to use the default value in brackets.")
          exp = (
              input(
                  "Experiment configuration to be created [%s]:" % exp
              )
              or exp
          )
          config = _update(config, "script", _set_script)
          res = conn.get_resource_type()
          config = _update(
              config,
              "resource",
              get_from_options,
              "computing resource for experiment",
              res,
          )
          config = _update(
              config,
              "n_parallel",
              _set_parallel,
              config["resource"],
              conn.cursor,
          )
          config = _update(
              config,
              "target",
              get_from_options,
              "max/min the score",
              ("max", "min"),
          )
          config = _update(
              config, "workingdir", _get_workingdir, config["resource"]
          )
  
          config.update(_set_proposer(default=config["proposer"]))
      except KeyboardInterrupt:
          logger.info("Terminated by user")
      except Exception as e:
          logger.fatal("Failed to initialize experiment configuration")
          raise e
      finally:
          logger.info("Write experiment config to %s", exp)
          with open(exp, "w") as f:
              json.dump(config, f, indent=2)
  
file_path: auptimizer/src/aup/init.py
imports: import importlib
  import json
  import logging
  import os
  from collections import defaultdict
  import click
  import coloredlogs
  from six.moves import input
  from .Proposer import PROPOSERS
  from .utils import LOG_LEVEL, get_default_connector, DEFAULT_AUPTIMIZER_PATH, get_from_options
label_desc: Use image node_id 6 for calling a global function with example usage: main(exp, aup, log, overwrite, reload) without return types