def get_nested_key(element, keys):
    """
    Returns the key at the nested position inside element, which should be a nested dictionary.
    """
    keys = list(keys)
    if not keys:
        return element
    key = keys.pop(0)
    if key not in element:
        return
    return get_nested_key(element[key], keys)