code: private static ImmutableMap<String, Node> getReplacementsHelper(Map<String, Object> source) {
      ImmutableMap.Builder<String, Node> map = ImmutableMap.builder();
      for (Map.Entry<String, Object> entry : source.entrySet()) {
        String name = entry.getKey();
        Object value = entry.getValue();
        if (value instanceof Boolean) {
          map.put(name, NodeUtil.booleanNode(((Boolean) value).booleanValue()));
        } else if (value instanceof Integer) {
          map.put(name, IR.number(((Integer) value).intValue()));
        } else if (value instanceof Double) {
          map.put(name, IR.number(((Double) value).doubleValue()));
        } else {
          checkState(value instanceof String);
          map.put(name, IR.string((String) value));
        }
      }
      return map.build();
    }
docs: Creates a map of String->Node from a map of String->Number/String/Boolean.