Write fetch_with_retry(call, max_attempts=5): call the function, retry on TimeoutError up to the cap, re-raise if the cap is hit, and return (result, attempt_number). The provided fake network fails twice then succeeds — so your wrapper should report success on attempt 3.