@contextlib.contextmanager<EOL>def _temporary_config():
global _config_cache, _config_file_path<EOL>old_cc = _config_cache<EOL>old_cfp = _config_file_path<EOL>clear_global_config()<EOL>yield<EOL>_config_cache = old_cc<EOL>_config_file_path = old_cfp<EOL>
Temporarily replace the global configuration.

    Use this in a 'with' statement.  The inner block may freely manipulate
    the global configuration; the original global configuration is restored
    at exit.

    >>> with yakonfig.yakonfig._temporary_config():
    ...   yakonfig.yakonfig.set_global_config({'a': 'b'})
    ...   print yakonfig.yakonfig.get_global_config('a')
    b