def assemble_default_config(modules):
def work_in(parent_config, config_name, prefix, module):<EOL><INDENT>my_config = dict(getattr(module, '<STR_LIT>', {}))<EOL>if config_name in parent_config:<EOL><INDENT>extra_config = parent_config[config_name]<EOL>raise ProgrammerError(<EOL>'<STR_LIT>'.format(<EOL>prefix, extra_config, my_config, module))<EOL><DEDENT>parent_config[config_name] = my_config<EOL><DEDENT>return _recurse_config(dict(), modules, work_in)<EOL>
Build the default configuration from a set of modules.

    `modules` is an iterable of
    :class:`yakonfig.configurable.Configurable` objects, or anything
    equivalently typed.  This produces the default configuration from
    that list of modules.

    :param modules: modules or Configurable instances to use
    :type modules: iterable of :class:`~yakonfig.configurable.Configurable`
    :return: configuration dictionary