public static BiMap<String, Integer> createOutputMap(Iterable<String> localOutputs) {
    ImmutableBiMap.Builder<String, Integer> builder = ImmutableBiMap.builder();
    int outputIndex = 0;
    // sort localOutputs for stable indexing
    for (String tag : Sets.newTreeSet(localOutputs)) {
      builder.put(tag, outputIndex);
      outputIndex++;
    }
    return builder.build();
  }
@Test
  public void testOutputMapCreation() {
    List<String> outputs = Arrays.asList("output1", "output2", "output3");
    BiMap<String, Integer> outputMap = PipelineTranslatorUtils.createOutputMap(outputs);
    Map<Object, Object> expected =
        ImmutableMap.builder().put("output1", 0).put("output2", 1).put("output3", 2).build();
    assertThat(outputMap, is(expected));
  }