'Return a list of one optgroup and selected values.'

def optgroups(self, name, value, attrs=None):

    default = (None, [], 0)
    groups = [default]
    for (i, v) in enumerate(self.options(name, value, attrs)):
        default[1].append(self.create_option(v, v, v, True, i))
    return groups
