def get_scoped(context, keys):
    """Retrieve an entry from a nested HAMT.

    Args:
        context: HAMT
        keys: iterable of nested keys

    Returns:
        HAMT"""
    for key in keys:
        context = context[key]
    return context