code: def check_config(cfg):
      """
      Check the correctness of the configuration file. Log error and exit
      when Config is not compliant.
      """
      err = "'{}' not specified in config file. Please set it in config file."
      check_list = ["architecture", "num_classes"]
      try:
          for var in check_list:
              if not var in cfg:
                  logger.error(err.format(var))
                  sys.exit(1)
      except Exception as e:
          pass
  
      if "log_iter" not in cfg:
          cfg.log_iter = 20
  
      return cfg
  
file_path: PaddleDetection/ppdet/utils/check.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import paddle
  import six
  import paddle.version
  from .logger import setup_logger
label_desc: Use image node_id 6 for calling a global function with example usage: check_config(cfg) and returns: cfg