get_with_retry(url, attempts=3) that retries failed GETs (network errors or 5xx statuses), sleeping 2 ** attempt seconds between tries (time.sleep), and re-raising after the last failure. 4xx errors must NOT be retried — the client is wrong, retrying won't help.get_with_retry(flaky_url)
the JSON once a try succeeds; the error after 3 failures
Backoff: 1 s, then 2 s, then give up.
response.status_code >= 500 is retryable.
Track the last exception for the final re-raise.