def collect(self):
        if not psutil:
            self.log.error('Unable to import psutil')
            self.log.error('No process resource metrics retrieved')
            return None

        for process in psutil.process_iter():
            self.collect_process_info(process)

        # publish results
        for pg_name, counters in self.processes_info.iteritems():
            metrics = (
                ("%s.%s" % (pg_name, key), value)
                for key, value in counters.iteritems())
            [self.publish(*metric) for metric in metrics]
            # reinitialize process info
            self.processes_info[pg_name] = {}
Collects resources usage of each process defined under the
dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/processresources/processresources.py/ProcessResourcesCollector.collect