hc.intensity_measure_types_and_levels is a dict and hc.intensity_measure_types a list, but you are overriding one with the other? It looks confusing.