from typing import Dict
from typing import Any
from typing import Optional


def __get(data: Dict[str, Any], key: str, src: Optional[str] = None) -> Any:
    """
    Get a value from a dictionary; if the key does not exist, raise an
    exception that identifies the missing key and the configuration section in
    which it was expected.

    :param data: The dictionary from which to get the value.
    :param key: The key name.
    :param src: The configuration section associated with the dictionary.
    """
    try:
        return data[key]
    except KeyError:
        if src is None:
            src = 'Configuration'
        if src:
            raise ValueError('{}: "{}" is missing'.format(src, key))
        else:
            raise ValueError('"{}" is missing'.format(key))