code: def _create_flat_pointers(dct, key_stack=()):
      # type: (Dict[str, Any], Tuple[str, ...]) -> Generator[Tuple[Tuple[str, ...], Dict[str, Any], str], None, None]
      
      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)
docs: Create a flattened dictionary of "key stacks" -> (value container, key)