code: def upgrade(self, config):
      mapping = {
          "training.resume_file": "checkpoint.resume_file",
          "training.resume": "checkpoint.resume",
          "training.resume_best": "checkpoint.resume_best",
          "training.load_pretrained": "checkpoint.resume_pretrained",
          "training.pretrained_state_mapping": "checkpoint.pretrained_state_mapping",
          "training.run_type": "run_type",
      }
  
      for old, new in mapping.items():
          value = OmegaConf.select(config, old)
          if value:
              OmegaConf.update(config, new, value)
  
imports: import collections
  import json
  import logging
  import os
  import warnings
  from ast import literal_eval
  from typing import List
  import torch
  from mmf.common.registry import registry
  from mmf.utils.env import import_user_module
  from mmf.utils.file_io import PathManager
  from mmf.utils.general import get_absolute_path, get_mmf_root
  from omegaconf import DictConfig, errors, OmegaConf
label_desc: Use image node_id 19 for calling the Configuration obj's underlying member method code with example usage: obj.upgrade(config) without return types