function assignConfigValue({ config, key, value, paths }) {
  if (paths.length) {
    setNestedKey(config, [...paths, key], value)
  } else {
    config[key] = value
  }
}
Assigns a value to a configuration option. In the case of a nested key
it will properly build the structure leading to the value

@param {object} params args to fn
@param {object} params.config object that is used to construct the agent config
@param {string} params.key name of the configuration option
@param {string} params.value value the configuration option
@param {Array} [params.paths] an array to capture the leaf node keys to properly assign defaults for nested objects