def get_in(d, *keys, default=None):
    """Get a nested value from a dict."""
    for k in keys:
        if not isinstance(d, dict) or k not in d:
            return default
        d = d[k]
    return d