from typing import List
from typing import Dict


def find_values(item, keys: List[str]) -> Dict:
    """Find values for keys in item, if present.

    Parameters
    ----------
    item : Any
        Any item
    keys : List[str]
        Keys whose value to retrieve in item

    Returns
    -------
    Dict
        Mapping of key -> value for keys found in item.

    Raises
    ------
    ValueError
        If one key is found whose value is a tuple, list or dict.
    """
    if isinstance(item, (list, tuple)):
        values = {}
        for it in item:
            values.update(find_values(it, keys))
        return values
    elif isinstance(item, dict):
        values = dict()
        for key, value in item.items():
            if key in keys:
                if isinstance(value, (list, tuple, dict)):
                    raise ValueError(f"Cannot find value for '{key}'. Type must be literal but got {type(value)}")
                values[key] = value
            else:
                values.update(find_values(value, keys))
        return values
    else:
        return {}