Return a value from nested dicts by the order of the given keys tuple.

    Parameters
    ----------
    key_tuple : tuple
        The keys to use for extraction, in order.
    dict_obj : dict
        The outer-most dict to extract from.

    Returns
    -------
    value : object
        The extracted value, if exists. Otherwise, raises KeyError.

    Example
    -------
    >>> dict_obj = {'a': {'b': 7}}
    >>> get_nested_val(('a', 'b'), dict_obj)
    7

def get_nested_val(key_tuple, dict_obj):
    """Return a value from nested dicts by the order of the given keys tuple.

    Parameters
    ----------
    key_tuple : tuple
        The keys to use for extraction, in order.
    dict_obj : dict
        The outer-most dict to extract from.

    Returns
    -------
    value : object
        The extracted value, if exists. Otherwise, raises KeyError.

    Example
    -------
    >>> dict_obj = {'a': {'b': 7}}
    >>> get_nested_val(('a', 'b'), dict_obj)
    7
    """
    if len(key_tuple) == 1:
        return dict_obj[key_tuple[0]]
    return get_nested_val(key_tuple[1:], dict_obj[key_tuple[0]])