Write python code for:
- interact with the following API https://randomuser.me/api/
- call the API 10 times
- Convert the received dictionnaries to objects (no need to convert all attributes, select a couple according to what is required)
- Store all objects in a local file
- Add option to use cached local file from previous run instead of querying the API
- Return statistics on the sample objects:
- Average age of people
- Top 5 oldest and top 5 youngest people