def group_by(self, *fields):
        """
        Clone the queryset using GroupByQuerySet.

        :param fields:
        :return:
        """
        fields = self._expand_group_by_fields(self.model, fields)
        clone = self._values(*fields)
        clone._iterable_class = GroupByIterable
        return clone
def group_by ( self , * fields ) : fields = self . _expand_group_by_fields ( self . model , fields ) clone = self . _values ( * fields ) clone . _iterable_class = GroupByIterable return clone
Clone the queryset using GroupByQuerySet.

        :param fields:
        :return: