def __set_process(self, pid):
        if self.__pid is not None:
            for gather in self.__gathers:
                gather.close()

        self.__pid = pid
        self.__gathers = []

        if pid is not None:
            self.__gathers.append(StatReader(self.__pid, self.__id, self._logger))
            self.__gathers.append(StatusReader(self.__pid, self.__id, self._logger))
            self.__gathers.append(IoReader(self.__pid, self.__id, self._logger))
        # TODO: Re-enable these if we can find a way to get them to truly report
        # per-app statistics.
        #        self.gathers.append(NetStatReader(self.pid, self.id, self._logger))
        #        self.gathers.append(SockStatReader(self.pid, self.id, self._logger))
Sets the id of the process for which this monitor instance should record metrics.
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/builtin_monitors/linux_process_metrics.py/ProcessMonitor.__set_process