code: def compat_cfg(cfg):
      """This function would modify some filed to keep the compatibility of
      config.
  
      For example, it will move some args which will be deprecated to the correct
      fields.
      """
      cfg = copy.deepcopy(cfg)
      cfg = compat_imgs_per_gpu(cfg)
      cfg = compat_loader_args(cfg)
      cfg = compat_runner_args(cfg)
      return cfg
  
imports: import copy
  import warnings
  from mmengine.config import ConfigDict
label_desc: Use image node_id 1 for calling a global function with example usage: compat_cfg(cfg) and returns: cfg