code: def restore_model_config(cfg, original_dict):
      with open_dict(cfg):
          for key, val in original_dict.items():
              logging.info(
                  f"Restoring model config key ({key}) from {cfg[key]} to original value of {val}"
              )
              cfg[key] = val
      return cfg
  
imports: import os
  import shutil
  import tarfile
  import tempfile
  from argparse import ArgumentParser
  from typing import Dict, List
  import torch
  import torch.nn
  from omegaconf import OmegaConf, open_dict
  from pytorch_lightning import Trainer
  from nemo.collections.nlp.parts.nlp_overrides import NEMO_MEGATRON_MODEL_PARALLEL_APPSTATE_OVERRIDE, GradScaler, MegatronHalfPrecisionPlugin, NLPDDPStrategy, NLPSaveRestoreConnector, PipelineMixedPrecisionPlugin
  from nemo.utils import logging, model_utils
  from nemo.utils.app_state import AppState
label_desc: Use image node_id 3 for calling a global function with example usage: restore_model_config(cfg, original_dict) and returns: cfg