def collect(self):
        """
        Overrides the Collector.collect method
        """

        if psutil is None:
            self.log.error('Unable to import module psutil')
            return {}

        for port_name, port_cfg in self.ports.iteritems():
            port = int(port_cfg['number'])
            stats = get_port_stats(port)

            for stat_name, stat_value in stats.iteritems():
                metric_name = (port_name, stat_name) % '%s.%s'
                self.publish(metric_name, stat_value)
dataset/ETHPy150Open Yelp/fullerite/src/diamond/collectors/portstat/portstat.py/PortStatCollector.collect/swapped operands of `%`