def write(self, data):
        quantile_25, quantile_75, states = data
        prefix = '%s.%s' % (self.namespace, self.service)
        count = len(states)
        invalid = 0
        now = int(time())
        tuples = []
        for name, state in states.iteritems():
            if state:
                invalid += 1
            name = extract_service_name(name)
            tuples.append(TimeSeriesTuple('%s.%s' % (prefix, name), now, state))

        tuples.append(TimeSeriesTuple('%s.%s' % (prefix, 'quantile_25'), now, quantile_25))
        tuples.append(TimeSeriesTuple('%s.%s' % (prefix, 'quantile_75'), now, quantile_75))
        tuples.append(TimeSeriesTuple('%s.%s' % (prefix, 'count'), now, count))
        tuples.append(TimeSeriesTuple((prefix, 'invalid') % '%s.%s', now, invalid))

        self.output_sink.write(tuples)
dataset/ETHPy150Open trademob/anna-molly/lib/plugins/tukeys_filter.py/TukeysFilter.write/swapped operands of `%`