def flat_backoff(count):
    return (1, 2, 5, 10, 15, 30, 60)[count if count < 6 else -1]
Wait 1, 2, 5, 10, 15, 30 and 60 seconds. All retries after the 5th retry will wait 60 seconds.
dataset/ETHPy150Open ionelmc/python-aspectlib/src/aspectlib/contrib.py/flat_backoff