import random


def exponential_backoff(attempt, base_delay=1, max_delay=60):
    # 2^attempt growth
    delay = base_delay * (2 ** attempt)

    # jitter
    jitter = random.uniform(0, 0.5)

    return min(delay + jitter, max_delay)
