code: def _KillProcess(self, pid):
      
      if sys.platform.startswith('win'):
        process_terminate = 1
        handle = ctypes.windll.kernel32.OpenProcess(
            process_terminate, False, pid)
        ctypes.windll.kernel32.TerminateProcess(handle, -1)
        ctypes.windll.kernel32.CloseHandle(handle)
  
      else:
        try:
          os.kill(pid, signal.SIGKILL)
        except OSError as exception:
          logger.error('Unable to kill process {0:d} with error: {1!s}'.format(
              pid, exception))
docs: Issues a SIGKILL or equivalent to the process.
  
      Args:
        pid (int): process identifier (PID).