code: private void addToProvideMap(
        Iterable<DependencyInfo> depInfos,
        Map<String, DependencyInfo> providesMap,
        boolean isFromDepsFile) {
      for (DependencyInfo depInfo : depInfos) {
        List<String> provides = new ArrayList<>(depInfo.getProvides());
  
        // Add a munged symbol to the provides map so that lookups by path requires work as intended.
        if (isFromDepsFile) {
          // Don't add the dependency file itself but every file it says exists instead.
          provides.add(
              loader
                  .resolve(
                      PathUtil.makeAbsolute(depInfo.getPathRelativeToClosureBase(), closurePathAbs))
                  .toModuleName());
        } else {
          // ES6 modules already provide these munged symbols.
          if (!"es6".equals(depInfo.getLoadFlags().get("module"))) {
            provides.add(loader.resolve(depInfo.getName()).toModuleName());
          }
        }
  
        // Also add the relative closure path as a provide. At some point we'll swap out the munged
        // symbols for these relative paths. So looks ups by either need to work.
        provides.add(depInfo.getPathRelativeToClosureBase());
  
        for (String provide : provides) {
          DependencyInfo prevValue = providesMap.put(provide, depInfo);
          // Check for duplicate provides.
          if (prevValue != null) {
            reportDuplicateProvide(provide, prevValue, depInfo);
          }
        }
      }
    }
docs: Adds the given DependencyInfos to the given providesMap. Also checks for and reports duplicate
  provides.