code: def assert_cfg():
      """Checks config values invariants."""
      err_str = "The first lr step must start at 0"
      assert not _C.OPTIM.STEPS or _C.OPTIM.STEPS[0] == 0, err_str
      data_splits = ["train", "val", "test"]
      err_str = "Data split '{}' not supported"
      assert _C.TRAIN.SPLIT in data_splits, err_str.format(
          _C.TRAIN.SPLIT
      )
      assert _C.TEST.SPLIT in data_splits, err_str.format(_C.TEST.SPLIT)
      err_str = "Mini-batch size should be a multiple of NUM_GPUS."
      assert _C.TRAIN.BATCH_SIZE % _C.NUM_GPUS == 0, err_str
      assert _C.TEST.BATCH_SIZE % _C.NUM_GPUS == 0, err_str
      err_str = "Log destination '{}' not supported"
      assert _C.LOG_DEST in ["stdout", "file"], err_str.format(
          _C.LOG_DEST
      )
      err_str = (
          "NUM_GPUS must be divisible by or less than MAX_GPUS_PER_NODE"
      )
      num_gpus, max_gpus_per_node = _C.NUM_GPUS, _C.MAX_GPUS_PER_NODE
      assert (
          num_gpus <= max_gpus_per_node
          or num_gpus % max_gpus_per_node == 0
      ), err_str
      err_str = "Invalid mode {}".format(_C.LAUNCH.MODE)
      assert _C.LAUNCH.MODE in [
          "local",
          "submitit_local",
          "slurm",
      ], err_str
  
imports: import os
  from pycls.core.io import pathmgr
  from yacs.config import CfgNode
label_desc: Use image node_id 1 for calling a global function with example usage: assert_cfg() without return types