def _walk_config(config, modules, f, prefix='<STR_LIT>'):
def work_in(parent_config, config_name, prefix, module):<EOL><INDENT>if config_name not in parent_config:<EOL><INDENT>raise ProgrammerError('<STR_LIT>'<EOL>.format(prefix))<EOL><DEDENT>if not isinstance(parent_config[config_name], collections.Mapping):<EOL><INDENT>raise ConfigurationError(<EOL>'<STR_LIT>'.format(prefix))<EOL><DEDENT>f(parent_config[config_name], module, prefix)<EOL><DEDENT>return _recurse_config(config, modules, work_in)<EOL>
Recursively walk through a module list.

    For every module, calls ``f(config, module, name)`` where
    `config` is the configuration scoped to that module, `module`
    is the Configurable-like object, and `name` is the complete
    path (ending in the module name).

    :param dict config: configuration to walk and possibly update
    :param modules: modules or Configurable instances to use
    :type modules: iterable of :class:`~yakonfig.configurable.Configurable`
    :param f: callback function for each module
    :param str prefix: prefix name of the config
    :return: config