@contextmanager<EOL>def config_prefix(prefix):
<EOL>global register_option, get_option, set_option, reset_option<EOL>def wrap(func):<EOL><INDENT>def inner(key, *args, **kwds):<EOL><INDENT>pkey = '<STR_LIT>'.format(prefix=prefix, key=key)<EOL>return func(pkey, *args, **kwds)<EOL><DEDENT>return inner<EOL><DEDENT>_register_option = register_option<EOL>_get_option = get_option<EOL>_set_option = set_option<EOL>set_option = wrap(set_option)<EOL>get_option = wrap(get_option)<EOL>register_option = wrap(register_option)<EOL>yield None<EOL>set_option = _set_option<EOL>get_option = _get_option<EOL>register_option = _register_option<EOL>
contextmanager for multiple invocations of API with a common prefix

    supported API functions: (register / get / set )__option

    Warning: This is not thread - safe, and won't work properly if you import
    the API functions into your module using the "from x import y" construct.

    Example:

    import pandas._config.config as cf
    with cf.config_prefix("display.font"):
        cf.register_option("color", "red")
        cf.register_option("size", " 5 pt")
        cf.set_option(size, " 6 pt")
        cf.get_option(size)
        ...

        etc'

    will register options "display.font.color", "display.font.size", set the
    value of "display.font.size"... and so on.