code: def load_cfg(sweep_cfg_file):
      """Loads config from specified sweep_cfg_file."""
      _C.merge_from_file(sweep_cfg_file)
      _C.SWEEP_CFG_FILE = os.path.abspath(sweep_cfg_file)
      # Check for required arguments
      err_msg = "{} has to be specified."
      assert _C.ROOT_DIR, err_msg.format("ROOT_DIR")
      assert _C.NAME, err_msg.format("NAME")
      assert _C.SETUP.NUM_CONFIGS, err_msg.format("SETUP.NUM_CONFIGS")
      # Check for allowed arguments
      opts = ["all", "last", "none"]
      err_msg = "COLLECT.CHECKPOINTS_KEEP has to be one of {}".format(
          opts
      )
      assert _C.COLLECT.CHECKPOINTS_KEEP in opts, err_msg
      # Setup the base config (note: this only alters the loaded global cfg)
      cfg.merge_from_other_cfg(_C.SETUP.BASE_CFG)
      # Load and validate each sampler against one of the SAMPLERS templates
      for param, sampler in _C.SETUP.SAMPLERS.items():
          _C.SETUP.SAMPLERS[param] = load_sampler(param, sampler)
  
file_path: pycls/pycls/sweep/config.py
imports: import argparse
  import getpass
  import multiprocessing
  import os
  import sys
  from pycls.core.config import cfg
  from pycls.sweep.samplers import validate_sampler
  from yacs.config import CfgNode
label_desc: Use image node_id 1 for calling a global function with example usage: load_cfg(sweep_cfg_file) without return types