static async getQueryConfigFromAnalyzer(analyzerObjectOrString, analyzerConfig) {
    let analyzer;
    if (typeof analyzerObjectOrString === 'string') {
      // Get it from our location(s) of predefined analyzers.
      // Mainly needed when this method is called via cli
      try {
        // eslint-disable-next-line import/no-dynamic-require, global-require
        const module = /** @type {Analyzer} */ (
          await import(
            path.join(
              'file:///',
              path.resolve(
                getCurrentDir(import.meta.url),
                `../analyzers/${analyzerObjectOrString}.js`,
              ),
            )
          )
        );
        analyzer = module.default;
      } catch (e) {
        LogService.error(e.toString());
        process.exit(1);
      }
    } else {
      // We don't need to import the analyzer, since we already have it
      analyzer = analyzerObjectOrString;
    }
    return /** @type {AnalyzerQueryConfig} */ ({
      type: 'ast-analyzer',
      analyzerName: /** @type {AnalyzerName} */ (analyzer.analyzerName),
      analyzerConfig,
      analyzer,
    });
  }
Retrieves the default export found in ./program/analyzers/find-import.js
@param {typeof Analyzer} analyzerObjectOrString
@param {AnalyzerConfig} [analyzerConfig]
@returns {Promise<AnalyzerQueryConfig>}