def get_separated_value(item: dict, field_keys: List[str]) -> any:
    """
    Retrieves the metadata value from the nested item based on field keys.
    """
    if not field_keys:
        return item
    key = field_keys[0]
    if isinstance(item, list):
        if len(item) == 0:
            return None
        else:
            item = item[0]
    if isinstance(item, dict) and key in item:
        return get_separated_value(item[key], field_keys[1:])
    return None

    Retrieves the metadata value from the nested item based on field keys.
    
llama-index-integrations/readers/llama-index-readers-wordlift/llama_index/readers/wordlift/base.py