def __iter__(self):
        fields = list(super(SettingsForm, self).__iter__())
        group = lambda field: field.name.split("_", 1)[0].title()
        misc = _("Miscellaneous")
        groups = defaultdict(int)
        for field in fields:
            groups[group(field)] += 1
        for (i, field) in enumerate(fields):
            setattr(fields[i], "group", group(field))
            if groups[fields[i].group] == 1:
                fields[i].group = misc
        return iter(sorted(fields, key=lambda x: (x.group == misc, x.group)))
Initializes this class.
dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/conf/forms.py/SettingsForm.__iter__--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/cli.py/_LuxiJobPollCb.__init__