code: def print_cfg(cfg):
      """
      Supports printing both Hydra DictConfig and also the AttrDict config
      """
      logging.info("Training with config:")
      if isinstance(cfg, DictConfig):
          if hasattr(cfg, "pretty"):
              # Backward compatibility
              logging.info(cfg.pretty())
          else:
              # Newest version of OmegaConf
              logging.info(OmegaConf.to_yaml(cfg))
      else:
          logging.info(pprint.pformat(cfg))
  
imports: import contextlib
  import copy
  import logging
  import math
  import os
  import pprint
  import re
  import sys
  from typing import Any, List, NamedTuple, Tuple
  import torch
  from hydra.core.override_parser.overrides_parser import OverridesParser
  from omegaconf import DictConfig, OmegaConf, open_dict
  from vissl.config import AttrDict, check_cfg_version
  from vissl.utils.io import save_file
  from vissl.utils.misc import is_augly_available
label_desc: Use image node_id 10 for calling a global function with example usage: print_cfg(cfg) without return types