def nested_get(d, *args, default=None):
    """Helper to access deeply-nested values in dictionaries"""
    for k in args:
        d = d.get(k)
        if not d:
            return default
    return d