code: def merge_into(
      new_config, base_config, overwrite=False, warn_overwrite=False
  ):
      """Merge one easy dict into another.
  
      If `overwrite` is set to true, conflicting keys will get their values from
      new_config. Else, the value will be taken from base_config.
      """
      if type(new_config) is not EasyDict:
          return
  
      for key, value in new_config.items():
          # Since we already have the values of base_config we check against them
          if not types_compatible(value, base_config.get(key)):
              raise ValueError(
                  'Incorrect type "{}" for key "{}". Must be "{}"'.format(
                      type(value), key, type(base_config.get(key))
                  )
              )
  
          # Recursively merge dicts
          if isinstance(value, dict):
              # Sometimes we want to completely replace the original key (i.e.
              # deleting all keys that aren't in new_config).
              if should_replace(new_config, base_config, key):
                  base_config[key] = value
              else:
                  base_config[key] = merge_into(
                      new_config[key],
                      base_config.get(key, EasyDict({})),
                      overwrite=overwrite,
                      warn_overwrite=warn_overwrite,
                  )
          else:
              if base_config.get(key) is None:
                  base_config[key] = value
              elif overwrite:
                  base_config[key] = value
                  if warn_overwrite:
                      tf.logging.warn('Overwrote key "{}"'.format(key))
  
      return base_config
  
file_path: luminoth/luminoth/utils/config.py
imports: import inspect
  import os.path
  import tensorflow
  import yaml
  from easydict import EasyDict
  from luminoth.models import get_model
label_desc: Use image node_id 9 for calling a global function with example usage: merge_into(new_config, base_config, overwrite, warn_overwrite) and returns: base_config