Create a flattened dictionary of "key stacks" -> (value container, key)

def _create_flat_pointers(dct, key_stack=()):
    # type: (Dict[str, Any], Tuple[str, ...]) -> Generator[Tuple[Tuple[str, ...], Dict[str, Any], str], None, None]
    """Create a flattened dictionary of "key stacks" -> (value container, key)
    """
    for k in dct.keys():
        current_key = key_stack + (k,)
        if isinstance(dct[k], BaseMapping):
            for flat_ptr in _create_flat_pointers(dct[k], current_key):
                yield flat_ptr
        else:
            yield (current_key, dct, k)