fetch_user(base_url, user_id) using requests.get on f'{base_url}/users/{user_id}', calling raise_for_status() so HTTP errors raise, and returning response.json() — the canonical three-line GET.fetch_user('https://api.example.com', 7)the parsed JSON dict for user 7
get → raise_for_status → json.
requests.get(url) returns a Response.
.json() parses the body for you.