Call HTTP endpoints, parse the JSON returned on GET, and do computations on the data (write an HTTP client, deserialization, REST calls).
Asked in the HackerRank OA stage. For grading, the HTTP layer is represented by json_responses, a list of successful GET response bodies. Implement compute_total(json_responses) to deserialize each body and return the sum of value for records whose include field is true.
Input: list of JSON strings, each containing records, a list of objects with integer value and boolean include. Output: one integer.
records list.value and a boolean include.def compute_total(json_responses):