code: def is_legacy_model_config(model_cfg: DictConfig) -> bool:
      """
      Test if model config is old style config. Old style configs are configs which were used before
      ``common_dataset_parameters`` item was added. Old style datasets use ``dataset`` instead of
      ``common_dataset_parameters``, ``batch_size`` instead of ``tokens_in_batch``. Old style configs do not support
      tarred datasets.
  
      Args:
          model_cfg: model configuration
  
      Returns:
          whether ``model_config`` is legacy
      """
      return "common_dataset_parameters" not in model_cfg
  
imports: from dataclasses import dataclass, field
  from typing import Any, Dict, Optional
  from omegaconf.omegaconf import MISSING, DictConfig, OmegaConf, open_dict
  from nemo.collections.common.parts.adapter_modules import LinearAdapterConfig
  from nemo.collections.nlp.data.token_classification.punctuation_capitalization_dataset import PunctuationCapitalizationEvalDataConfig, PunctuationCapitalizationTrainDataConfig, legacy_data_config_to_new_data_config
  from nemo.core.config import TrainerConfig
  from nemo.core.config.modelPT import NemoConfig
  from nemo.utils.exp_manager import ExpManagerConfig
label_desc: Use image node_id 1 for calling a global function with example usage: is_legacy_model_config(model_cfg) and returns: unknown