Regroup items.

def regroup(self, group_by=None):
        """Regroup items."""
        if not group_by:
            group_by = self.group_by

        groups = self.groups
        self.groups = {}

        for g in groups:
            for item in groups[g]:
                self.add(item, group_by)