def dget_tkey(dictionary, tuple_key, default=None, ignore_case=True,
    raise_if_missing=False):
    """
    Dictionary helper function to retrieve values from dictionaries with tuple keys.
    Yields the first value found corresponding to a tuple_key found within that key.
    :param dictionary:
    :param tuple_key:
    :param default:
    :param ignore_case:
    :param raise_if_missing:
    :return:
    """
    if ignore_case:
        if isinstance(tuple_key, str):
            tuple_key = tuple_key.lower()
        else:
            ignore_case = False
    for keys, value in dictionary.iteritems():
        for key in keys:
            if ignore_case and isinstance(key, str):
                key = key.lower()
            if tuple_key != key:
                continue
            return value
    if raise_if_missing:
        raise KeyError(tuple_key)
    return default
