class_docstr: A facility for config and config files.
  
  It supports common file formats as configs: python/json/yaml. The interface
  is the same as a dict object and also allows access config values as
  attributes.
  
  Example:
      >>> cfg = Config(dict(a=1, b=dict(b1=[0, 1])))
      >>> cfg.a
      1
      >>> cfg.b
      {'b1': [0, 1]}
      >>> cfg.b.b1
      [0, 1]
      >>> cfg = Config.fromfile('tests/data/config/a.py')
      >>> cfg.filename
      "/home/kchen/projects/mmcv/tests/data/config/a.py"
      >>> cfg.item4
      'test'
      >>> cfg
      "Config [path: /home/kchen/projects/mmcv/tests/data/config/a.py]: "
      "{'item1': [1, 2], 'item2': {'a': 0}, 'item3': True, 'item4': 'test'}"
docstr: Merge list into cfg_dict.
  
  Merge the dict parsed by MultipleKVAction into this cfg.
  
  Examples:
      >>> options = {'model.backbone.depth': 50,
      ...            'model.backbone.with_cp':True}
      >>> cfg = Config(dict(model=dict(backbone=dict(type='ResNet'))))
      >>> cfg.merge_from_dict(options)
      >>> cfg_dict = super(Config, self).__getattribute__('_cfg_dict')
      >>> assert cfg_dict == dict(
      ...     model=dict(backbone=dict(depth=50, with_cp=True)))
  
      # Merge list element
      >>> cfg = Config(dict(pipeline=[
      ...     dict(type='LoadImage'), dict(type='LoadAnnotations')]))
      >>> options = dict(pipeline={'0': dict(type='SelfLoadImage')})
      >>> cfg.merge_from_dict(options, allow_list_keys=True)
      >>> cfg_dict = super(Config, self).__getattribute__('_cfg_dict')
      >>> assert cfg_dict == dict(pipeline=[
      ...     dict(type='SelfLoadImage'), dict(type='LoadAnnotations')])
  
  Args:
      options (dict): dict of configs to merge from.
      allow_list_keys (bool): If True, int string keys (e.g. '0', '1')
        are allowed in ``options`` and will replace the element of the
        corresponding index in the config if the config is a list.
        Default: True.
docstr_tok: ["Merge","list","into","cfg_dict",".","Merge","the","dict","parsed","by","MultipleKVAction","into","this","cfg",".","Examples",":",">",">",">","options","=","{","'model.backbone.depth","'",":","50",",","...","'model.backbone.with_cp","'",":","True","}",">",">",">","cfg","=","Config","(","dict","(","model=dict","(","backbone=dict","(","type='ResNet","'",")",")",")",")",">",">",">","cfg.merge_from_dict","(","options",")",">",">",">","cfg_dict","=","super","(","Config",",","self",")",".__getattribute__","(","'_cfg_dict","'",")",">",">",">","assert","cfg_dict","==","dict","(","...","model=dict","(","backbone=dict","(","depth=50",",","with_cp=True",")",")",")","#","Merge","list","element",">",">",">","cfg","=","Config","(","dict","(","pipeline=","[","...","dict","(","type='LoadImage","'",")",",","dict","(","type='LoadAnnotations","'",")","]",")",")",">",">",">","options","=","dict","(","pipeline=","{","'","0","'",":","dict","(","type='SelfLoadImage","'",")","}",")",">",">",">","cfg.merge_from_dict","(","options",",","allow_list_keys=True",")",">",">",">","cfg_dict","=","super","(","Config",",","self",")",".__getattribute__","(","'_cfg_dict","'",")",">",">",">","assert","cfg_dict","==","dict","(","pipeline=","[","...","dict","(","type='SelfLoadImage","'",")",",","dict","(","type='LoadAnnotations","'",")","]",")","Args",":","options","(","dict",")",":","dict","of","configs","to","merge","from",".","allow_list_keys","(","bool",")",":","If","True",",","int","string","keys","(","e.g",".","'","0","'",",","'","1","'",")","are","allowed","in","``","options","``","and","will","replace","the","element","of","the","corresponding","index","in","the","config","if","the","config","is","a","list",".","Default",":","True","."]
code: def merge_from_dict(self, options, allow_list_keys=True):
      """Merge list into cfg_dict.
  
      Merge the dict parsed by MultipleKVAction into this cfg.
  
      Examples:
          >>> options = {'model.backbone.depth': 50,
          ...            'model.backbone.with_cp':True}
          >>> cfg = Config(dict(model=dict(backbone=dict(type='ResNet'))))
          >>> cfg.merge_from_dict(options)
          >>> cfg_dict = super(Config, self).__getattribute__('_cfg_dict')
          >>> assert cfg_dict == dict(
          ...     model=dict(backbone=dict(depth=50, with_cp=True)))
  
          # Merge list element
          >>> cfg = Config(dict(pipeline=[
          ...     dict(type='LoadImage'), dict(type='LoadAnnotations')]))
          >>> options = dict(pipeline={'0': dict(type='SelfLoadImage')})
          >>> cfg.merge_from_dict(options, allow_list_keys=True)
          >>> cfg_dict = super(Config, self).__getattribute__('_cfg_dict')
          >>> assert cfg_dict == dict(pipeline=[
          ...     dict(type='SelfLoadImage'), dict(type='LoadAnnotations')])
  
      Args:
          options (dict): dict of configs to merge from.
          allow_list_keys (bool): If True, int string keys (e.g. '0', '1')
            are allowed in ``options`` and will replace the element of the
            corresponding index in the config if the config is a list.
            Default: True.
      """
      option_cfg_dict = {}
      for full_key, v in options.items():
          d = option_cfg_dict
          key_list = full_key.split(".")
          for subkey in key_list[:-1]:
              d.setdefault(subkey, ConfigDict())
              d = d[subkey]
          subkey = key_list[-1]
          d[subkey] = v
  
      cfg_dict = super(Config, self).__getattribute__("_cfg_dict")
      super(Config, self).__setattr__(
          "_cfg_dict",
          Config._merge_a_into_b(
              option_cfg_dict, cfg_dict, allow_list_keys=allow_list_keys
          ),
      )
  
imports: import ast
  import copy
  import os
  import os.path
  import platform
  import shutil
  import sys
  import tempfile
  import uuid
  import warnings
  from argparse import Action, ArgumentParser
  from collections import abc
  from importlib import import_module
  from addict import Dict
  from yapf.yapflib.yapf_api import FormatCode
  from .misc import import_modules_from_strings
  from .path import check_file_exist
label_desc: Use image node_id 24 for calling the Config obj's underlying member method code with example usage: obj.merge_from_dict(options, allow_list_keys) without return types