def METHOD_NAME(start=0, fn=identity, max_retries=math.inf):
    """
    generator returning a delay (usually interpreted as seconds) before next retry
    :param start: the first delay
    :param fn: the function computing the next delay from the previous one
    :param max_retries:
    :return:
    """
    delay = start
    retries = 1
    while True:
        if 0 <= max_retries < retries:
            return
        yield delay
        retries = retries+1
        delay = fn(delay)