function ensureAnalyzerResultFormat(queryOutput, cfg, analyzer) {
  const { targetProjectMeta, identifier, referenceProjectMeta } = analyzer;
  const optional = {};
  if (targetProjectMeta) {
    optional.targetProject = { ...targetProjectMeta };
    delete optional.targetProject.path; // get rid of machine specific info
  }
  if (referenceProjectMeta) {
    optional.referenceProject = { ...referenceProjectMeta };
    delete optional.referenceProject.path; // get rid of machine specific info
  }

  /** @type {AnalyzerQueryResult} */
  const aResult = {
    queryOutput,
    analyzerMeta: {
      name: analyzer.constructor.analyzerName,
      requiredAst: analyzer.constructor.requiredAst,
      identifier,
      ...optional,
      configuration: cfg,
    },
  };

  // For now, delete data relatable to local machine + path data that will recognize
  // projX#v1 (via rootA/projX#v1, rootB/projX#v2) as identical entities.
  // Cleaning up local data paths will make  sure their hashes will be similar
  // across different machines
  delete aResult.analyzerMeta.configuration.referenceProjectPath;
  delete aResult.analyzerMeta.configuration.targetProjectPath;

  const { referenceProjectResult, targetProjectResult } = aResult.analyzerMeta.configuration;

  if (referenceProjectResult) {
    delete aResult.analyzerMeta.configuration.referenceProjectResult;
  } else if (targetProjectResult) {
    delete aResult.analyzerMeta.configuration.targetProjectResult;
  }

  if (Array.isArray(aResult.queryOutput)) {
    aResult.queryOutput.forEach(projectOutput => {
      if (projectOutput.project) {
        delete projectOutput.project.path;
      }
    });
  }

  if (process.platform === 'win32') {
    posixify(aResult);
  }

  return aResult;
}
This method ensures that the result returned by an analyzer always has a consistent format.
By returning the configuration for the queryOutput, it will be possible to run later queries
under the same circumstances
@param {QueryOutput} queryOutput
@param {object} cfg
@param {Analyzer} analyzer