getHostAddonInfo(packageInfoForLazyEngine) {
    const cacheKey = `${this.project._packageInfo.realPath}-${packageInfoForLazyEngine.realPath}`;

    let hostInfoCacheEntry = this._hostAddonInfoCache.get(cacheKey);

    if (hostInfoCacheEntry) {
      return hostInfoCacheEntry;
    }

    if (!packageInfoForLazyEngine.isForEngine()) {
      throw new Error(
        `[ember-cli] \`${packageInfoForLazyEngine.name}\` is not an engine; \`getHostAddonInfo\` should only be used to find host information about engines`
      );
    }

    const queue = [{ pkgInfo: this.project._packageInfo, path: [] }];
    const visited = new Set();
    const foundPaths = [];

    while (queue.length) {
      const { pkgInfo: currentPackageInfo, path } = queue.shift();

      const {
        addonMainPath,
        inRepoAddons = [],
        dependencyPackages = {},
        devDependencyPackages = {},
      } = currentPackageInfo;

      const isCurrentPackageInfoProject = this.project._packageInfo === currentPackageInfo;

      // don't process non-ember addons
      if (!isCurrentPackageInfoProject && typeof addonMainPath !== 'string') {
        continue;
      }

      // store found paths
      if (currentPackageInfo === packageInfoForLazyEngine) {
        foundPaths.push([...path]);
      }

      // don't process a given `PackageInfo` object more than once
      if (!visited.has(currentPackageInfo)) {
        visited.add(currentPackageInfo);

        // add current package info to current path
        path.push(currentPackageInfo);

        queue.push(
          ...[...inRepoAddons, ...Object.values(dependencyPackages), ...Object.values(devDependencyPackages)].map(
            (pkgInfo) => ({ pkgInfo, path: [...path] })
          )
        );
      }
    }

    const [hostPackageInfo, foundPath] = this._findNearestBundleHost(foundPaths, packageInfoForLazyEngine);

    const hostAndAncestorBundledPackageInfos = foundPath
      .filter((pkgInfo) => pkgInfo.isForBundleHost())
      .reduce((acc, curr) => {
        acc.push(...this._getBundledPackageInfos(curr));
        return acc;
      }, []);

    hostInfoCacheEntry = {
      hostPackageInfo,
      hostAndAncestorBundledPackageInfos: new Set(hostAndAncestorBundledPackageInfos),
    };

    this._hostAddonInfoCache.set(cacheKey, hostInfoCacheEntry);
    return hostInfoCacheEntry;
  }
This function intends to return a common host for a bundle host (lazy engine). The root
package info should be the starting point (i.e., the project's package info). We do this
by performing a breadth-first traversal until we find the intended lazy engine (represented
as a package-info & the 1st argument passed to this function). As part of the traversal, we keep
track of all paths to said engine; then, once we find the intended engine we use this to determine
the nearest common host amongst all shortest paths.

Some context:

For a given engine/bundle host, this finds the lowest common ancestor that is considered a
host amongst _all_ engines by the same name in the project.

For example, given the following package structure:

     --Project--
      /      \
     /        \
Lazy Engine A  \
             Addon A
               |
               |
          Lazy Engine B
           /          \
          /            \
     Lazy Engine A   Lazy Engine C

- The LCA host for Lazy Engine A is the project
- The LCA host for Lazy Engine B is the project
- The LCA host for Lazy Engine C is Lazy Engine B

This also returns `hostAndAncestorBundledPackageInfos`, which are all bundled addons above a given host:

- `hostAndAncestorBundledPackageInfos` for lazy engine A includes all non-lazy dependencies of its LCA host & above (in this case, just the project)
- `hostAndAncestorBundledPackageInfos` for lazy engine B includes all non-lazy dependencies of its LCA host & above (in this case, just the project)
- `hostAndAncestorBundledPackageInfos` for lazy engine C includes non-lazy deps of lazy engine B & non-lazy deps of the project (LCA host & above)

This is intended to mimic the behavior of `ancestorHostAddons` in `ember-engines`:
https://github.com/ember-engines/ember-engines/blob/master/packages/ember-engines/lib/engine-addon.js#L333

Unfortunately, we can't easily repurpose the logic in `ember-engines` since the algorithm has to be different;
in `ember-engines` we need access to the actual addon instance, however, this is intended to be used _during_
addon instantiation, so we only have access to package-info objects. In having said this, we _can_ repurpose
the `hostPackageInfo` to determine the LCA host; see below `findLCAHost`.

@method getHostAddonInfo
@param {PackageInfo} packageInfoForLazyEngine
@return {{ hostPackageInfo: PackageInfo, hostAndAncestorBundledPackageInfos: Set<PackageInfo> }}