The first condition "imt in hc.intensity_measure_types_and_levels" is redundant, the second could be made more readable, for instance by introducing a name such as

extra_imt = set(hc.intensity_measure_types_and_levels) - set(levels)