code: def setup(args):
      """
      Create configs and perform basic setups.
      """
      cfg = get_cfg_from_args(args)
      os.makedirs(args.output_dir, exist_ok=True)
      default_setup(args)
      apply_scaling_rules_to_cfg(cfg)
      write_config(cfg, args.output_dir)
      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 5 for calling a global function with example usage: setup(args) and returns: cfg