lookupTailNameHub = async petNamePath => {
      if (petNamePath.length === 0) {
        throw new TypeError(`Empty pet name path`);
      }
      const headPath = petNamePath.slice(0, -1);
      const tailName = petNamePath[petNamePath.length - 1];
      if (headPath.length === 0) {
        // eslint-disable-next-line no-use-before-define
        return { hub: directory, name: tailName };
      }
      const nameHub = /** @type {NameHub} */ (await lookup(headPath));
      return { hub: nameHub, name: tailName };
    }
@param {Array<string>} petNamePath
@returns {Promise<{ hub: NameHub, name: string }>}