def _StopOnVm(self, vm):
    """Stop dstat on 'vm', copy the results to the run temporary directory."""
    if self._pids not in vm.name:
      logging.warn('No dstat PID for %s', vm.name)
      return
    else:
      with self._lock:
        pid = self._pids.pop(vm.name)
        file_name = self._file_names.pop(vm.name)
    cmd = 'kill {0} || true'.format(pid)
    vm.RemoteCommand(cmd)
    try:
      vm.PullFile(self.output_directory, file_name)
    except Exception:
      logging.exception('Failed fetching dstat result from %s.', vm.name)
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/traces/dstat.py/_DStatCollector._StopOnVm/swapped operands of `not in`