def get_process_state(self, name, pids, cpu_check_interval):
        st = defaultdict(list)

        for pid in pids:
            st['pids'].append(pid)

            try:
                p = psutil.Process(pid)
            # Skip processes dead in the meantime
            except psutil.NoSuchProcess:
                self.warning(pid % 'Process %s disappeared while scanning')
                # reset the PID cache now, something changed
                self.last_pid_cache_ts[name] = 0
                continue

            meminfo = self.psutil_wrapper(p, 'memory_info', ['rss', 'vms'])
            st['rss'].append(meminfo.get('rss'))
            st['vms'].append(meminfo.get('vms'))

            # will fail on win32 and solaris
            shared_mem = self.psutil_wrapper(p, 'memory_info_ex', ['shared']).get('shared')
            if shared_mem is not None and meminfo.get('rss') is not None:
                st['real'].append(meminfo['rss'] - shared_mem)
            else:
                st['real'].append(None)

            ctxinfo = self.psutil_wrapper(p, 'num_ctx_switches', ['voluntary', 'involuntary'])
            st['ctx_swtch_vol'].append(ctxinfo.get('voluntary'))
            st['ctx_swtch_invol'].append(ctxinfo.get('involuntary'))

            st['thr'].append(self.psutil_wrapper(p, 'num_threads', None))
            st['cpu'].append(self.psutil_wrapper(p, 'cpu_percent', None, cpu_check_interval))

            st['open_fd'].append(self.psutil_wrapper(p, 'num_fds', None))

            ioinfo = self.psutil_wrapper(p, 'io_counters', ['read_count', 'write_count', 'read_bytes', 'write_bytes'])
            st['r_count'].append(ioinfo.get('read_count'))
            st['w_count'].append(ioinfo.get('write_count'))
            st['r_bytes'].append(ioinfo.get('read_bytes'))
            st['w_bytes'].append(ioinfo.get('write_bytes'))

        return st
dataset/ETHPy150Open serverdensity/sd-agent/checks.d/process.py/ProcessCheck.get_process_state/swapped operands of `%`