Build the parse-and-validate step. Write a function extract_user(raw)
that takes a JSON string the model returned, parses it with
json.loads, validates that:
nameis present and astrageis present and anint
If the JSON is missing a field or has the wrong type, return the
string "invalid". Otherwise return the parsed dict.
Then the script will call it on a good response and print the name.
Expected output:
priya