code: def compat_imgs_per_gpu(cfg):
      cfg = copy.deepcopy(cfg)
      if "imgs_per_gpu" in cfg.data:
          warnings.warn(
              '"imgs_per_gpu" is deprecated in MMDet V2.0. '
              'Please use "samples_per_gpu" instead'
          )
          if "samples_per_gpu" in cfg.data:
              warnings.warn(
                  f'Got "imgs_per_gpu"={cfg.data.imgs_per_gpu} and '
                  f'"samples_per_gpu"={cfg.data.samples_per_gpu}, "imgs_per_gpu"'
                  f"={cfg.data.imgs_per_gpu} is used in this experiments"
              )
          else:
              warnings.warn(
                  'Automatically set "samples_per_gpu"="imgs_per_gpu"='
                  f"{cfg.data.imgs_per_gpu} in this experiments"
              )
          cfg.data.samples_per_gpu = cfg.data.imgs_per_gpu
      return cfg
  
imports: import copy
  import warnings
  from mmengine.config import ConfigDict
label_desc: Use image node_id 3 for calling a global function with example usage: compat_imgs_per_gpu(cfg) and returns: cfg