'Create and cache a (metric name, metric type) by WMI property map and a property list.'

def _get_wmi_properties(self, instance_key, metrics, tag_queries):

    if (instance_key not in self.wmi_props):
        metric_name_by_property = dict(((wmi_property.lower(), (metric_name, metric_type)) for (wmi_property, metric_name, metric_type) in metrics))
        properties = map((lambda x: x[0]), (metrics + tag_queries))
        self.wmi_props[instance_key] = (metric_name_by_property, properties)
    return self.wmi_props[instance_key]
