code: def get_cfg_from_args(args):
      args.output_dir = os.path.abspath(args.output_dir)
      args.opts += [f"train.output_dir={args.output_dir}"]
      default_cfg = OmegaConf.create(dinov2_default_config)
      cfg = OmegaConf.load(args.config_file)
      cfg = OmegaConf.merge(
          default_cfg, cfg, OmegaConf.from_cli(args.opts)
      )
      return cfg
  
file_path: dinov2/dinov2/utils/config.py
imports: import math
  import logging
  import os
  from omegaconf import OmegaConf
  import dinov2.distributed
  from dinov2.logging import setup_logging
  from dinov2.utils import utils
  from dinov2.configs import dinov2_default_config
label_desc: Use image node_id 3 for calling a global function with example usage: get_cfg_from_args(args) and returns: cfg