'Called by validate. Handles setting the configspec on subsections
including sections to be validated by __many__'

def _set_configspec(self, section, copy):

    configspec = section.configspec
    many = configspec.get('__many__')
    if isinstance(many, dict):
        for entry in section.sections:
            if (entry not in configspec):
                section[entry].configspec = many
    for entry in configspec.sections:
        if (entry == '__many__'):
            continue
        if (entry not in section):
            section[entry] = {}
            if copy:
                section.comments[entry] = configspec.comments.get(entry, [])
                section.inline_comments[entry] = configspec.inline_comments.get(entry, '')
        if isinstance(section[entry], Section):
            section[entry].configspec = configspec[entry]
