code: def load_from_dict(self, dictionary, _override=True, _allow_undeclared=False):
      
      undeclared_keys = []
      for key, value in self._modules['six'].iteritems(dictionary):
        # Warn in this case.  We raise if you try to access a config key that
        # hasn't been declared, but we don't raise here so that you can use
        # configuration files that are supersets of required configuration for
        # any particular test station.
        if key not in self._declarations and not _allow_undeclared:
          undeclared_keys.append(key)
          continue
        if key in self._loaded_values:
          if _override:
            self._logger.info(
                'Overriding previously loaded value for %s (%s) with value: %s',
                key, self._loaded_values[key], value)
          else:
            self._logger.info(
                'Ignoring new value (%s), keeping previous value for %s: %s',
                value, key, self._loaded_values[key])
            continue
  
        # Force any keys and values that are bytes to unicode.
        key = key.decode() if isinstance(key, bytes) else key
        value = value.decode() if isinstance(value, bytes) else value
  
        self._loaded_values[key] = value
      if undeclared_keys:
        self._logger.warning('Ignoring undeclared configuration keys: %s',
                             undeclared_keys)
docs: Loads the config with values from a dictionary instead of a file.
  
      This is meant for testing and bin purposes and shouldn't be used in most
      applications.
  
      Args:
        dictionary: The dictionary containing config keys/values to update.
        _override: If True, new values will override previous values.
        _allow_undeclared: If True, silently load undeclared keys, otherwise
            warn and ignore the value.  Typically used for loading config
            files before declarations have been evaluated.