_findNearestBundleHost(paths, pkgInfoForLazyEngine) {
    // building an engine in isolation (it's considered the project, but it's
    // also added as a dependency to the project by `ember-cli`)
    if (this.project._packageInfo === pkgInfoForLazyEngine) {
      return [this.project._packageInfo, [this.project._packageInfo]];
    }

    const shortestPath = paths.reduce(
      (acc, pathToLazyEngine) => Math.min(acc, pathToLazyEngine.length),
      Number.POSITIVE_INFINITY
    );

    const pathsEqualToShortest = paths.filter((pathToLazyEngine) => pathToLazyEngine.length === shortestPath);
    const [firstPath] = pathsEqualToShortest;

    for (let i = firstPath.length - 1; i >= 0; i--) {
      const pkgInfo = firstPath[i];

      if (pkgInfo.isForBundleHost() && allPkgInfosEqualAtIndex(pathsEqualToShortest, i)) {
        return [pkgInfo, firstPath.slice(0, i + 1)];
      }
    }

    // this should _never_ be triggered
    throw new Error(
      `[ember-cli] Could not find a common host for: \`${pkgInfoForLazyEngine.name}\` (located at \`${pkgInfoForLazyEngine.realPath}\`)`
    );
  }
Given a path (calculated as part of `getHostAddonInfo`), return the correct
"bundle host". A bundle host is considered the project or lazy engine.

For example, given the following package structure:

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

The provided paths for lazy engine A would look like:

- [Project]
- [Project, Addon A, Lazy Engine B]

For this project structure, this function would return [Project, [Project]]

Similarly, given the following project structure:

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

The provided paths for lazy engine C would look like:

- [Project, Lazy Engine A]
- [Project, Lazy Engine B]

In this case, the host is the project and would also return [Project, [Project]]

@method _findNearestBundleHost
@param {Array<PackageInfo[]>} paths The found paths to a given bundle host
@return {[PackageInfo, PackageInfo[]]}
@private