code: def _ioctl(self, func, arg):
          
          if self._fd is None:
              raise WatchdogError("Watchdog device is closed")
          if os.name != 'nt':
              import fcntl
              fcntl.ioctl(self._fd, func, arg, True)
docs: Runs the specified ioctl on the underlying fd.
  
          Raises WatchdogError if the device is closed.
          Raises OSError or IOError (Python 2) when the ioctl fails.