function setValueInComponents(keyInComponents, components, value, componentsKeys) {
  let currentPlace = components,
    target = keyInComponents[keyInComponents.length - 2],
    key = keyInComponents.length === 2 && componentsKeys.includes(keyInComponents[0]) ?
      keyInComponents[1] :
      null;
  if (componentsKeys.includes(keyInComponents[0])) {
    if (keyInComponents[0] === 'schema') {
      keyInComponents[0] = 'schemas';
    }
    target = key;
  }

  for (let place of keyInComponents) {
    if (place === target) {
      currentPlace[place] = value;
      break;
    }
    else if (currentPlace[place]) {
      currentPlace = currentPlace[place];
    }
    else {
      currentPlace[place] = {};
      currentPlace = currentPlace[place];
    }
  }
}
Set a value in the global components object following the provided trace
@param {array} keyInComponents - The trace to the key in components
@param {object} components - A global components object
@param {object} value - The value from node matched with data
@param {array} componentsKeys - The keys of the reusable component
@returns {null} It modifies components global context