NumPy allowed · plain Python earns 10 bonus points
Implement defensive nested property lookup (optional chaining) -- essential for safely querying deeply nested REST payloads, GraphQL responses, and LLM structured outputs.
Implement safe_nested_get(data, keys, default=None): walk through keys sequentially within data. If at any stage a key does not exist or the current object is not a dictionary, return default. If keys is empty, return data.
safe_nested_get(data: dict, keys: list[str], default=None)