def gather_sample(self):
        """Collect the per-process metrics for the monitored process.

        If the process is no longer running, then attempts to match a new one.
        """
        if self.__pid != None and not self.__is_running():
            self.__set_process(None)

        if self.__pid is None:
            self.__set_process(self.__select_process())

        for gather in self.__gathers:
            gather.run_single_cycle()
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/builtin_monitors/linux_process_metrics.py/ProcessMonitor.gather_sample/operator `is not` -> `!=`