code: def convert_model_config_to_dict_config(
      cfg: Union["DictConfig", "NemoConfig"]
  ) -> "DictConfig":
      """
      Converts its input into a standard DictConfig.
      Possible input values are:
      -   DictConfig
      -   A dataclass which is a subclass of NemoConfig
  
      Args:
          cfg: A dict-like object.
  
      Returns:
          The equivalent DictConfig
      """
      if not _HAS_HYDRA:
          logging.error(
              "This function requires Hydra/Omegaconf and it was not installed."
          )
          exit(1)
      if not isinstance(cfg, (OmegaConf, DictConfig)) and is_dataclass(
          cfg
      ):
          cfg = OmegaConf.structured(cfg)
  
      if not isinstance(cfg, DictConfig):
          raise ValueError(
              f"cfg constructor argument must be of type DictConfig/dict but got {type(cfg)} instead."
          )
  
      config = OmegaConf.to_container(cfg, resolve=True)
      config = OmegaConf.create(config)
      return config
  
imports: import copy
  import importlib
  import os
  from dataclasses import dataclass, is_dataclass
  from enum import Enum
  from functools import lru_cache
  from pathlib import Path
  from typing import List, Optional, Tuple, Union
  import wrapt
  from nemo.utils import AppState, logging
  from nemo.utils.data_utils import resolve_cache_dir
  from nemo.utils.data_utils import is_datastore_path
label_desc: Use image node_id 7 for calling a global function with example usage: convert_model_config_to_dict_config(cfg) and returns: config