def _add_case_data_total(self, queryset, indicator_prefix, range_name, legacy_prefix=None):
        total_data = defaultdict(lambda: 0)
        for result in queryset:
            owner = result['case_owner']
            count = result['count']
            self._update_dataset(total_data, owner, count)

        self._reformat_and_add(
            total_data,
            '{}_{}'.format(indicator_prefix, range_name),
            legacy_name='{}{}'.format(legacy_prefix, range_name.title()) if legacy_prefix else None
        )
Given a QuerySet containing data for case based indicators generate the 'total'
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/callcenter/indicator_sets.py/CallCenterIndicators._add_case_data_total