function getKeyInComponents(traceFromParent, mainKey, version, commonPathFromData, parentNodeKey = undefined) {
  const {
    CONTAINERS,
    DEFINITIONS,
    COMPONENTS_KEYS,
    INLINE,
    ROOT_CONTAINERS_KEYS
  } = getBundleRulesDataByVersion(version);
  let result,
    newFPN = mainKey.replace(generateObjectName(commonPathFromData), ''),
    trace = [
      ...traceFromParent,
      jsonPointerDecodeAndReplace(newFPN)
    ].reverse(),
    traceToKey = [],
    matchFound = false,
    hasNotParent = parentNodeKey === undefined,
    isRootAndReusableItemsContainer = ROOT_CONTAINERS_KEYS.includes(traceFromParent[0]),
    isAComponentKeyReferenced = COMPONENTS_KEYS.includes(traceFromParent[0]) && hasNotParent;

  if (isRootAndReusableItemsContainer || isAComponentKeyReferenced) {
    return [];
  }

  for (let [index, item] of trace.entries()) {
    let itemShouldBeResolvedInline = INLINE.includes(item);

    if (itemShouldBeResolvedInline) {
      matchFound = false;
      break;
    }
    item = resolveFirstLevelChild(item, CONTAINERS);
    resolveSecondLevelChild(trace, index, DEFINITIONS);
    traceToKey.push(item.replace(/\s/g, ''));
    if (COMPONENTS_KEYS.includes(item)) {
      matchFound = true;
      break;
    }
  }
  result = matchFound ?
    traceToKey.reverse() :
    [];
  return result;
}
returns the key that the object in components will have could be nested
@param {string} traceFromParent the node trace from root.
@param {string} mainKey - The generated mainKey for the components
@param {string} version - The current spec version
@param {string} commonPathFromData - The common path in the file's paths
@param {string} parentNodeKey - The parent key before the trace
@returns {Array} - the calculated keys in an array representing each nesting property name