Sets a new timeout for an already acquired lock.

        ``new_timeout`` can be specified as an integer or a float, both
        representing the number of seconds.

def renew(self, new_timeout):
        """
        Sets a new timeout for an already acquired lock.

        ``new_timeout`` can be specified as an integer or a float, both
        representing the number of seconds.
        """
        if self.local.token is None:
            raise LockError("Cannot extend an unlocked lock")
        if self.timeout is None:
            raise LockError("Cannot extend a lock with no timeout")
        return self.do_renew(new_timeout)