private Map<String, String> generateHeaders() {
        Map<String, String> combinedHeaders = new HashMap<String, String>();

        for (Map.Entry<String, List<LazyHeaderFactory>> entry : headers.entrySet()) {
            StringBuilder sb = new StringBuilder();
            List<LazyHeaderFactory> factories = entry.getValue();
            for (int i = 0; i < factories.size(); i++) {
                LazyHeaderFactory factory = factories.get(i);
                sb.append(factory.buildHeader());
                if (i != factories.size() - 1) {
                    sb.append(',');
                }
            }
            combinedHeaders.put(entry.getKey(), sb.toString());
        }

        return combinedHeaders;
    }
A wrapper class for a set of headers to be included in a Glide request, allowing headers to be
constructed lazily.

<p> Ideally headers are constructed once and then re-used for multiple loads, rather then being
constructed individually for each load. </p>

<p> This class is thread safe. </p>
core/src/main/java/com/bumptech/glide/load/model/LazyHeaders.java