Order output exactly as specified in the list `types`

using collections.OrderedDict available in Python >=2.7.x