code: public static Map<String, String> parseModuleWrappers(
        List<String> specs, Iterable<JSModule> chunks) {
      checkState(specs != null);
  
      Map<String, String> wrappers = new HashMap<>();
  
      // Prepopulate the map with module names.
      for (JSModule c : chunks) {
        wrappers.put(c.getName(), "");
      }
  
      for (String spec : specs) {
        // Format is "<name>:<wrapper>".
        int pos = spec.indexOf(':');
        if (pos == -1) {
          throw new FlagUsageException(
              "Expected module wrapper to have " + "<name>:<wrapper> format: " + spec);
        }
  
        // Parse module name.
        String name = spec.substring(0, pos);
        if (!wrappers.containsKey(name)) {
          throw new FlagUsageException("Unknown module: '" + name + "'");
        }
        String wrapper = spec.substring(pos + 1);
        // Support for %n% and %output%
        wrapper = wrapper.replace("%output%", "%s").replace("%n%", "\n");
        if (!wrapper.contains("%s")) {
          throw new FlagUsageException("No %s placeholder in module wrapper: '" + wrapper + "'");
        }
  
        wrappers.put(name, wrapper);
      }
      return wrappers;
    }
docs: Parses module wrapper specifications.
  
  @param specs A list of module wrapper specifications, not null. The spec format is: <code>
  name:wrapper</code>. Wrappers.
  @param chunks The JS chunks whose wrappers are specified
  @return A map from module name to module wrapper. Modules with no wrapper will have the empty
  string as their value in this map.