code: def save_config(_config, _log, config_filename='config.json'):
      
      if 'config_filename' in _config:
          del _config['config_filename']
      _log.info('Saving config to "{}"'.format(config_filename))
      save_config_file(flatten(_config), config_filename)
docs: Store the updated configuration in a file.
  
      By default uses the filename "config.json", but that can be changed by
      setting the config_filename config entry.