Parse WMI Event Consumers.

def ParseMultiple(self, result_dicts):
    """Parse WMI Event Consumers."""
    for result_dict in result_dicts:
      wmi_dict = result_dict.ToDict()

      try:
        creator_sid_bytes = bytes(wmi_dict["CreatorSID"])
        wmi_dict["CreatorSID"] = BinarySIDtoStringSID(creator_sid_bytes)
      except ValueError:
        # We recover from corrupt SIDs by outputting it raw as a string
        wmi_dict["CreatorSID"] = compatibility.Repr(wmi_dict["CreatorSID"])
      except KeyError:
        pass

      for output_type in self.output_types:
        anomalies = []

        output = rdfvalue.RDFValue.classes[output_type]()
        for k, v in iteritems(wmi_dict):
          try:
            output.Set(k, v)
          except AttributeError as e:
            # Skip any attribute we don't know about
            anomalies.append("Unknown field %s, with value %s" % (k, v))
          except ValueError as e:
            anomalies.append("Invalid value %s for field %s: %s" % (v, k, e))

        # Yield anomalies first to help with debugging
        if anomalies:
          yield rdf_anomaly.Anomaly(
              type="PARSER_ANOMALY",
              generated_by=self.__class__.__name__,
              finding=anomalies)

        # Raise if the parser generated no output but there were fields.
        if wmi_dict and not output:
          raise ValueError("Non-empty dict %s returned empty output." %
                           wmi_dict)

        yield output