code: public static Multimap<String, Integer> mapOutputsToSrcs(
        @Nullable String locale,
        String outputPathFormat,
        ImmutableList<SoyFileNode> fileNodes) {
      Multimap<String, Integer> outputs = ArrayListMultimap.create();
  
      // First, check that the parent directories for all output files exist, and group the output
      // files by the inputs that go there.
      // This means that the compiled source from multiple input files might be written to a single
      // output file, as is the case when there are multiple inputs, and the output format string
      // contains no wildcards.
      for (int i = 0; i < fileNodes.size(); ++i) {
        SoyFileNode inputFile = fileNodes.get(i);
        String inputFilePath = inputFile.getFilePath();
        String outputFilePath =
            MainEntryPointUtils.buildFilePath(outputPathFormat, locale, inputFilePath);
  
        BaseUtils.ensureDirsExistInPath(outputFilePath);
        outputs.put(outputFilePath, i);
      }
      return outputs;
    }
docs: Maps output paths to indices of inputs that should be emitted to them.
  
  @param locale The locale for the file path, or null if not applicable.
  @param outputPathFormat The format string defining how to format output file paths.
  @param fileNodes A list of the SoyFileNodes being written.
  @return A map of output file paths to their respective input indicies.