def METHOD_NAME(self, seconds):
    """
    Arm the hardware watchdog with a timeout of <seconds> seconds.
    If the watchdog is currently armed, calling this function will
    simply reset the timer to the provided value. If the underlying
    hardware does not support the value provided in <seconds>, this
    method should arm the watchdog with the *next greater* available
    value.
    Returns:
        An integer specifying the *actual* number of seconds the watchdog
        was armed with. On failure returns -1.
    """
    if self.watchdog is None:
        self._set_arm()
    ret = WDT_COMMON_ERROR
    if seconds < 0 or self.watchdog is None:
        return ret
    try:
        if self.timeout != seconds:
            self.timeout = self._settimeout(seconds)
        if self.armed:
            self._keepalive()
        else:
            self._enable()
            self.armed = True
        ret = self.timeout
    except IOError as e:
        pass
    return ret