'Define the available settings in a section.
``cls_`` must be a subclass of ``StaticSection``. If the section has
already been defined with a different class, ValueError is raised.
If ``validate`` is True, the section\'s values will be validated, and an
exception raised if they are invalid. This is desirable in a module\'s
setup function, for example, but might not be in the configure function.'

def define_section(self, name, cls_, validate=True):

    if (not issubclass(cls_, StaticSection)):
        raise ValueError(u'Class    must    be    a    subclass    of    StaticSection.')
    current = getattr(self, name, None)
    current_name = str(current.__class__)
    new_name = str(cls_)
    if ((current is not None) and (not isinstance(current, self.ConfigSection)) and (not (current_name == new_name))):
        raise ValueError(u'Can    not    re-define    class    for    section    from    {}    to    {}.'.format(current_name, new_name))
    setattr(self, name, cls_(self, name, validate=validate))
