function getTraceFromParentKeyInComponents(nodeContext, tempRef, mainKeys, version, commonPathFromData) {
  const parents = [...nodeContext.parents].reverse(),
    isArrayKeyRegexp = new RegExp('^\\d+$', 'g'),
    key = nodeContext.key,
    keyIsAnArrayItem = key.match(isArrayKeyRegexp),
    parentKeys = [...parents.map((parent) => {
      return parent.key;
    })],
    nodeParentsKey = keyIsAnArrayItem ?
      parentKeys :
      [key, ...parentKeys],
    nodeTrace = getRootFileTrace(nodeParentsKey),
    componentKey = createComponentMainKey(tempRef, mainKeys),
    parentNodeKey = nodeContext.parent.key,
    keyTraceInComponents = getKeyInComponents(
      nodeTrace,
      componentKey,
      version,
      commonPathFromData,
      parentNodeKey
    );
  return keyTraceInComponents;
}
Return a trace from the current node's root to the place where we find a $ref
@param {object} nodeContext - The current node we are processing
@param {object} tempRef - The tempRef from the $ref
@param {object} mainKeys - The dictionary of the previous keys generated
@param {string} version - The current version of the spec
@param {string} commonPathFromData - The common path in the file's paths
@returns {array} The trace to the place where the $ref appears