def METHOD_NAME(self):
    ncausefailure = 3
    faildelay = 0.1
    sufficient_timeout = ncausefailure * (faildelay + 10)
    insufficient_timeout = ncausefailure * faildelay * 0.5
    @retry.retry()
    def method(check, kwcheck=None):
        assert check
        assert kwcheck
        nonlocal failcounter
        if failcounter < ncausefailure:
            time.sleep(faildelay)
            failcounter += 1
            raise retry.RetryError
        return True
    failcounter = 0
    kw = {
        "kwcheck": True,
        "retry_timeout": sufficient_timeout,
    }
    self.assertTrue(method(True, **kw))
    failcounter = 0
    kw = {
        "kwcheck": True,
        "retry_timeout": insufficient_timeout,
    }
    with self.assertRaises(retry.RetryTimeoutError):
        method(True, **kw)