def nested_lookup(dictionary, *entry):
    """get a nested entry from a dictionary"""
    try:
        if isinstance(entry, str):
            v = dictionary[entry]
        else:
            v = None
            for e in entry:
                v = v[e] if v is not None else dictionary[e]
    except:
        raise Exception("could not find entry '" + '/'.join(list(entry)) +
            "' in the dictionary")
    return v
