function resolveArtifactDependencies(artifact, gatherer, artifactDefnsBySymbol) {
  if (!('dependencies' in gatherer.instance.meta)) return undefined;

  const dependencies = Object.entries(gatherer.instance.meta.dependencies).map(
      ([dependencyName, artifactSymbol]) => {
        const dependency = artifactDefnsBySymbol.get(artifactSymbol);

        // Check that dependency was defined before us.
        if (!dependency) throwInvalidDependencyOrder(artifact.id, dependencyName);

        // Check that the phase relationship is OK too.
        const validDependency = isValidArtifactDependency(gatherer, dependency.gatherer);
        if (!validDependency) throwInvalidArtifactDependency(artifact.id, dependencyName);

        return [dependencyName, {id: dependency.id}];
      }
  );

  return Object.fromEntries(dependencies);
}
Looks up the required artifact IDs for each dependency, throwing if no earlier artifact satisfies the dependency.

@param {LH.Config.ArtifactJson} artifact
@param {LH.Config.AnyGathererDefn} gatherer
@param {Map<Symbol, LH.Config.AnyArtifactDefn>} artifactDefnsBySymbol
@return {LH.Config.AnyArtifactDefn['dependencies']}